[issue20074] open() of read-write non-seekable streams broken

Antoine Pitrou report at bugs.python.org
Fri Dec 27 18:01:27 CET 2013


Antoine Pitrou added the comment:

> Having buffering doesn't make the stream seekable.  So the question
> is, is the *design* of the IO module that '+' requires a seekable
> stream the best behavior, or can that constraint be relaxed?

A non-seekable read/write stream doesn't really make sense (think about
it).
What you may be thinking about, instead, is a pair of non-seekable
streams, one readable and one writable. There is BufferedRWPair for
that:
http://docs.python.org/dev/library/io.html#io.BufferedRWPair

(granted, BufferedRWPair isn't wired in open(), so you have to do all
the wrapping yourself)

----------

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


More information about the Python-bugs-list mailing list