[Python-Dev] IO module precisions and exception hierarchy
Antoine Pitrou
solipsis at pitrou.net
Sun Sep 27 17:32:14 CEST 2009
MRAB <python <at> mrabarnett.plus.com> writes:
>
> If the characters are always the same number of bytes) then overwriting
> could be possible; that would, however, make the behaviour more
> complicated (sometimes you can, sometimes you can't), so it's probably
> just simpler to forbid read+write text streams.
Forbidding them would be gratuitous. There are perfectly safe uses, for example
if all writes are appends, or if you use a fixed-size encoding.
(and besides, it would break backwards compatibility)
Regards
Antoine.
More information about the Python-Dev
mailing list