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.

Author lemburg
Recipients belopolsky, doerwalter, ezio.melotti, lemburg, nascheme, r.david.murray, serhiy.storchaka, vstinner, wpk, xtreak
Date 2018-10-05.12:28:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <71cb2771-dd45-4a7a-11ac-64ad8b34c287@egenix.com>
In-reply-to <1538741209.85.0.545547206417.issue18291@psf.upfronthosting.co.za>
Content
On 05.10.2018 14:06, Serhiy Storchaka wrote:
> 
> Then this particularity of codecs streams should be explicitly documented.

Yes, probably. Such extensions of scope for different character
types in Unicode vs. ASCII are a common gotcha when moving from
Python 2 to 3. The same applies to eg. upper/lower
case conversion, conversion to numeric values, the various .is*()
methods, etc.

> codecs.open() was advertised as a way of writing portable code for Python 2 and 3, and it can still be used in many old programs.

AFAIR, we changed this to recommend io.open() instead,
after the io module was rewritten in C.

Before that we did indeed advertise codecs.open() as a way to
write code which produces Unicode in a similar way as io does
in Python 3 (they were never fully identical, though).
History
Date User Action Args
2018-10-05 12:28:09lemburgsetrecipients: + lemburg, doerwalter, nascheme, belopolsky, vstinner, ezio.melotti, r.david.murray, serhiy.storchaka, wpk, xtreak
2018-10-05 12:28:09lemburglinkissue18291 messages
2018-10-05 12:28:09lemburgcreate