Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle flush as a keyword arg to print() #1127

Closed
dhalbert opened this issue Aug 19, 2018 · 0 comments
Closed

Handle flush as a keyword arg to print() #1127

dhalbert opened this issue Aug 19, 2018 · 0 comments
Assignees
Labels
cpython api modules from cpython enhancement

Comments

@dhalbert
Copy link
Collaborator

dhalbert commented Aug 19, 2018

The latest MicroPython merge, incorporated in 4.0.0-alpha, now checks the validity of keyword args to print(), instead of ignoring keywords it doesn't recognize.

flush is not currently handled, but has valid uses: cf. adafruit/Adafruit_CircuitPython_Fingerprint#9, where print(..., end="", flush=True) is passed to allow incremental status messages to be printed on the same line.

It looks like flush=True is the "default", and flush=False (buffers output) is not possible with the current I/O implementation, if I understand correctly

Note that file= isn't implemented either: that would be nice, but also maybe not possible now. (No issue opened for that.)

@dhalbert dhalbert added this to the 4.0 Beta milestone Aug 19, 2018
@tannewt tannewt added enhancement cpython api modules from cpython labels Aug 20, 2018
@tannewt tannewt modified the milestones: 4.0 Beta, 4.0.0 - Bluetooth Dec 7, 2018
@tannewt tannewt self-assigned this Feb 16, 2019
dhalbert pushed a commit that referenced this issue Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpython api modules from cpython enhancement
Projects
None yet
Development

No branches or pull requests

2 participants