[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u
Eryk Sun
report at bugs.python.org
Tue Nov 7 08:29:07 EST 2017
Eryk Sun <eryksun at gmail.com> added the comment:
The error is in _io__WindowsConsoleIO_write_impl. If it's passed a length 0 buffer, it still tries to decode it via MultiByteToWideChar, which fails as documented. As Serhiy says, it can simply return Python int(0) in the zero-length case.
----------
nosy: +eryksun
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31966>
_______________________________________
More information about the Python-bugs-list
mailing list