[issue17976] file.write doesn't raise IOError when it should

Serhiy Storchaka report at bugs.python.org
Tue May 14 18:39:02 CEST 2013


Serhiy Storchaka added the comment:

Indeed, fwrite() can return expected number of items and set errno. Here is a simple example on C. An output is:

setvbuf 0 0
fwrite 5 0
fwrite 1 28
fwrite 1 28

On writing "\n" fwrite returns 1 and set errno to ENOSPC.

----------
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file30259/fullwrite.c

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17976>
_______________________________________


More information about the Python-bugs-list mailing list