Serhiy Storchaka added the comment:
>>> f = open("/dev/full", "wb", buffering=0)
>>> f.write(b"Write to full device")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 28] No space left on device
>>> f.close()
>>> f.closed
True
>>> f = open("/dev/full", "wb")
>>> f.write(b"Write to full device")
20
>>> f.close()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 28] No space left on device
>>> f.closed
False
Python 2 has the same behavior using io.open.
----------
nosy: +serhiy.storchaka
versions: +Python 2.7, Python 3.3, Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16597>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com