Terry J. Reedy added the comment:

The revised doc admits the problem: "If *ensure_ascii* is False, some chunks 
written to *fp* may be unicode instances.  Unless fp.write() explicitly 
understands unicode (as in codecs.getwriter) this is likely to cause an error."

Making text be unicode in 3.x is our attempt at a generic fix to the problems 
resulting from the bug-prone 2.x 'text may be bytes or unicode' design.  Since 
continued 2.7 support is aimed at supporting legacy code, we are very reluctant 
to make behavior changes that could break working code.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13769>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to