➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 ncoghlan
收信人 ncoghlan
日期 2012-06-28.10:49:16
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za>
In-reply-to
内容
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())

[1] http://mail.python.org/pipermail/python-ideas/2012-June/015535.html
历史
日期 用户 动作 参数
2012-06-28 10:49:18ncoghlan修改recipients: + ncoghlan
2012-06-28 10:49:18ncoghlan修改messageid: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za>
2012-06-28 10:49:17ncoghlan链接issue15216 messages
2012-06-28 10:49:16ncoghlan创建