[Python-Dev] PEP 414

Chris McDonough chrism at plope.com
Fri Mar 2 21:13:18 CET 2012


On Fri, 2012-03-02 at 14:41 -0500, Barry Warsaw wrote:
> On Mar 02, 2012, at 02:48 PM, Nick Coghlan wrote:
> 
> >Consider: an application that uses 8-bit strings everywhere and blows up on
> >non-ASCII data in Python 2 has at least a fighting chance to run unmodified
> >*and* handle Unicode properly on Python 3. Because unicode literals are gone,
> >a Unicode-aware Python 2 application currently has *no* chance to run
> >unmodified on Python 3.
> 
> On its face, this statement is incorrect.
> 
> It *might* be accurate if qualified by saying "a Unicode-aware Python 2 *web*
> application".  I say "might" because I'm not an expert on web frameworks so I
> defer to those who are.  It certainly can't be applied to the entire universe
> of Unicode-aware Python 2 applications.

FWIW, I think this issue's webness may be overestimated.  There happens
to be lots and lots of existing UI code which contains complex
interactions between unicode literals and nonliterals in web apps, but
there's also likely lots of nonweb code that has the same issue.  If
e.g. wxPython had already been ported, I think you'd be hearing the same
sorts of things from folks that had investments in existing
Python-2-compatible code when trying to port stuff to Py3 (at least if
they wanted to run on both Python 2 and Python 3 within the same
codebase).

- C




More information about the Python-Dev mailing list