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

Nick Coghlan ncoghlan at gmail.com
Fri Dec 9 04:11:10 CET 2011

On Fri, Dec 9, 2011 at 12:01 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 12/8/2011 7:52 PM, 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.
> I would expect that running one codebase would push one to only run on 2.6+,
> which would make one codebase easier, but it does not seem to.

Actually, most of the feedback I've heard is that using one codebase
is comparatively straightforward if you can drop support for 2.5 and
earlier. Mainly because of this:

>>> from __future__ import unicode_literals
>>> from __future__ import print_function
>>> print
<built-in function print>
>>> print(type(''))
<type 'unicode'>
>>> print(type(b''))
<type 'str'>

That's why I'm quite happy to say to people that if they currently
have to support 2.5 or earlier, and they're not prepared to fork their
codebase or drop support for those earlier Python versions in new
releases, then it's *perfectly fine* for them to delay their 3.x
support until they *can* use the compatibility tools we provide to
make "single source" approaches easier.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list