[issue21364] Documentation Recommends Broken Pattern

Antoine Pitrou report at bugs.python.org
Thu May 15 22:47:13 CEST 2014


Antoine Pitrou added the comment:

> To avoid further problems may I also recommend documenting how exactly
> people are supposed to wrap sys.stdout and so forth.  Clearly putting
> a StringIO there is insufficient as StringIO does not have a buffer.

I would like to know of some situations where you want to write some
code that accesses standard streams as binary *and* don't control the
application setup (i.e. library code rather than application code). It
seems to me that a library should take the binary streams as parameters
rather than force the use of stdin/stdout.

----------

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


More information about the Python-bugs-list mailing list