[Python-Dev] PEP 414 - Unicode Literals for Python 3

Nick Coghlan ncoghlan at gmail.com
Tue Feb 28 13:49:06 CET 2012


On Tue, Feb 28, 2012 at 10:19 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>
> Le mardi 28 février 2012 à 22:14 +1000, Nick Coghlan a écrit :
>> If you're using separate branches, then your Python 2 code isn't being
>> made forward compatible with Python 3. Yes, it avoids making your
>> Python 2 code uglier, but it means maintaining two branches in
>> parallel until you drop Python 2 support.
>
> IMO, maintaining two branches shouldn't be much more work than
> maintaining hacks so that a single codebase works with two different
> programming languages.

Aside from the unicode literal problem, I find that the Python
2.6+/3.2+ subset is still a fairly nice language for an application
level web program. Most of the rest of the bytes/text ugliness is
hidden away below the framework layer where folks like Chris, Armin
and Jacob have to deal with it, but it doesn't affect me as a
framework user.

>> You've once again raised the
>> barrier to entry: either people contribute two patches, or they accept
>> that their patch may languish until someone else writes the patch for
>> the other version.
>
> Again that's wrong. If you cleverly use 2to3 to port between branches,
> patches only have to be written against the 2.x version.

Apparently *you* know how to do that, but I don't. If I, as a CPython
core developer, don't know how to do that, how is it reasonable to
expect J. Random Hacker to become a Python 3 porting export?

PEP 414 is all about lowering the barrier to entry for successful
Python 3 ports. OK, fine some very clever people have invested a lot
of time in finding ways to deal with the status quo that make it less
painful. That doesn't mean it isn't painful - it just means the early
adopters have steeled themselves against the pain and learned to suck
it up and cope. Now that we've discovered some of the key sources of
pain, we can live with a few pragmatic concessions in the purity of
Python 3's language definition to ease the transition for the vast
number of Python 3 ports which have yet to begin.

Cheers,
Nick.

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


More information about the Python-Dev mailing list