Author ncoghlan
Recipients ncoghlan
Date 2012-06-28.10:49:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
As discussed on python-ideas, swapping out the sys.std* streams can be fraught with peril. This can make writing code that wants to support an "--encoding" option for pipeline processing difficult.

The proposal [1] is that TextIOWrapper support a set_encoding() method that is only supported between creation of the stream and the first read or write operation. Once the stream is "dirty", you can no longer change the encoding - you must replace the stream (e.g. by passing stream.fileNo() to open())

Date User Action Args
2012-06-28 10:49:18ncoghlansetrecipients: + ncoghlan
2012-06-28 10:49:18ncoghlansetmessageid: <>
2012-06-28 10:49:17ncoghlanlinkissue15216 messages
2012-06-28 10:49:16ncoghlancreate