[Python-Dev] readd u'' literal support in 3.3?

Guido van Rossum guido at python.org
Fri Dec 9 06:43:35 CET 2011


On Thu, Dec 8, 2011 at 9:33 PM, Chris McDonough <chrism at plope.com> wrote:

> On Thu, 2011-12-08 at 19:52 -0500, Glyph wrote:
> > Zooming back in to the actual issue this thread is about, I think the
> > u""-vs-"" issue is a bit of a red herring, because the _real_ problem
> > here is that 2to3 is slow and buggy and so migration efforts are
> > starting to work around it, and therefore want to run the same code on
> > 3.x and all the way back to 2.5.
>
> Even if it weren't slow, I still wouldn't use it to automatically
> convert code at install time; a single codebase is easier to reason
> about, and easier to support.  Users send me tracebacks all the time;
> having them match the source is a wonderful thing.


Even though 2to3 was my idea, I am gradually beginning to appreciate this
approach. I skimmed the docs for "six" and liked it.

But I think the specific proposal of adding u"..." literals back to 3.3 is
not going to do much good. If we had had the foresight way back when, we
could have added them back to 3.1 and we would have been okay. But having
them in 3.3 but not in 3.2 is just adding insult to injury. I recommend
writing b"...".decode('utf-8'); maybe six's u() does the same?

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20111208/f0ac6db1/attachment.html>


More information about the Python-Dev mailing list