Message366117
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? |
|
Date |
User |
Action |
Args |
2020-04-10 11:37:56 | pavlix | set | recipients:
+ pavlix, pitrou, benjamin.peterson, stutzbach, r.david.murray, python-dev, hynek, martin.panter, serhiy.storchaka, Dolda2000, cagney |
2020-04-10 11:37:56 | pavlix | set | messageid: <1586518676.07.0.99745318358.issue20074@roundup.psfhosted.org> |
2020-04-10 11:37:56 | pavlix | link | issue20074 messages |
2020-04-10 11:37:55 | pavlix | create | |
|