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

Lennart Regebro regebro at gmail.com
Tue Feb 28 10:21:53 CET 2012


On Tue, Feb 28, 2012 at 08:51, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> Lennart Regebro <regebro <at> gmail.com> writes:
>
>> I'm +1 on the PEP, for reasons already repeated here.
>> We need three types of strings when supporting both Python 2 and
>> Python 3. A binary string, a unicode string and a "native" string, ie
>> one that is the old 8-bit str in python 2 but a Unicode str in Python
>> 3.
>
> Well it's a done deal, and as I said elsewhere on the thread, I wasn't opposing
> the PEP, but wanting some improvements in it. ISTM that given the PEP as it is,
> working across 3.2 and 3.3 on a single codebase may not always be the easiest
> process (IIUC you have to run a mini2to3 process, and it'll need to be cleverer
> than 2to3 about running over the entire codebase if it's to appear seamless),

Distribute helps with this. I think we might have to add a support in
distribute to easily exclude the fixer that removes u''-prefixes, I
don't remember if there is an "exclude" feature.


More information about the Python-Dev mailing list