Message327134
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). |
|
Date |
User |
Action |
Args |
2018-10-05 12:28:09 | lemburg | set | recipients:
+ lemburg, doerwalter, nascheme, belopolsky, vstinner, ezio.melotti, r.david.murray, serhiy.storchaka, wpk, xtreak |
2018-10-05 12:28:09 | lemburg | link | issue18291 messages |
2018-10-05 12:28:09 | lemburg | create | |
|