pavlix <pav...@pavlix.net> added the comment:

Okay, let me help the situation a bit. The “workaround” of using `buffering=0` 
works perfect with `rb+` and `wb+` and I'm pretty sure I used this in the past. 
I don't know how well this is documented.

I would usually need to disable buffering for any real-time binary 
communication anyway, so for me the workaround is reasonable. As for buffered 
I/O and `r+`/`b+` where you cannot disable buffering, I don't know.

It would be useful to have a good reason behind the limitation of Python and 
have it documented, or have the limitation lifted if there's none, so this 
issue can be closed.

Could anyone please explain why binary streams default to buffered I/O in the 
first place? Does it make any sense or it's just historical cruft?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue20074>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to