[Python-Dev] cpython: whatsnew: 'U' mode deprecation (#15204). (original) (raw)

Serhiy Storchaka storchaka at gmail.com
Mon Mar 10 17:32:13 CET 2014


10.03.14 15:09, Nick Coghlan написав(ла):

Huh, I missed that change. Don't we still need U when writing 2/3 compatible code at this point? If so, perhaps we may want to reconsider this particular deprecation in 3.4.1.

In most cases the 'U' mode either no-op or forbidden in Python 3. It may be needed only when you use built-in open() in Python 2 and open without the encoding and newlines arguments in Python 3 (but it will be better to use io.open()).

http://bugs.python.org/issue15204



More information about the Python-Dev mailing list