[issue14176] Fix unicode literals

Terry J. Reedy report at bugs.python.org
Sat Mar 3 00:21:06 CET 2012


Terry J. Reedy <tjreedy at udel.edu> added the comment:

> That would mean in Python 3, '...' works and u'...' will not work.

You misunderstand the PEP: in 3.3, '...' and u'...' will be *exactly* the same. The only change is that the interpreter will ignore the u prefix instead of raising SyntaxError. It will be as if 'u' were not there. The only purpose is to let 2.x code run in 3.x without requiring the user to erase the 'u'.

I can see how you could misunderstand and think that the 'u' prefix must have some meaning. But is does not. The addition is a bit controversial but Guido approved it with the expectation that it will encourage more conversion of 2.x libraries to run on 3.3. In any case, the tracker is not the place for further discussion of the value of the PEP.

> Once again, an *illustration* with IDLE / Py2.
...
> Of course, this is actually a no problem with Py 3.
...
> It still remains that this is a serious problem on Py 2.

We are painfully aware that 2.x has problems with unicode. You do not need to tell us. I believe that most of the problems that could be sensibly fixed in 2.x have been fixed. 3.0 fixed more problems by changing the language. 3.3 fixes still more problems by changing the internal implementation of unicode, along with the C api, and the meaning of the language on some systems. People who want to avoid all the problems that have been fixed should use 3.3 either from the repository or when it is released.

> So, if this (u'...') works in Py 3.3, the problem can
be considered as "solved".

I am glad you agree and I will close the issue.

Please use python-list for any further discussion or questions.

----------
resolution:  -> out of date
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14176>
_______________________________________


More information about the Python-bugs-list mailing list