En Thu, 23 Jul 2009 21:49:26 -0300, Naoki INADA <[email protected]>
escribió:
The encoding that this file uses. When Unicode strings are written to
a file,
they will be converted to byte strings using this encoding. In
addition,
when the file is connected to a terminal, the attribute gives the
encoding
that the terminal is likely to use
I feel this doc means "file object with encoding attribute encodes
unicode
regardless it is tty or not" and sys.stdout/stderr defies convention.
The 'encoding' file attribute is very confusing and mostly unsupported (or
there is a bug in the documentation, at least in Python 2.x). See
http://bugs.python.org/issue4947
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list