[Python-3000] u'text' as an alias for 'text'?

Jim Jewett jimjjewett at gmail.com
Thu Mar 20 16:15:16 CET 2008


Lennart Regebro
Ralf Schmitt


On 3/20/08, Amaury Forgeot d'Arc <amauryfa at gmail.com> wrote:

> What about using sys.path_hooks to run 2to3 on the fly at import time?
>  It would cache its results, of course.

I think even that might be overkill; Lennart (and others) are talking
about trying to use the same code in both cases, and finding that the
only difference is u"..." vs "...".

That sounds simple enough that I think it could be done as part of a codec.
Instead of of "coding: utf-8", he could use "coding: py2-utf-8", which
would delegate to utf-8, and then make this one fairly quick
substution.

-jJ


More information about the Python-3000 mailing list