[Python-Dev] Proposal: from __future__ import unicode_string_literals

Thomas Wouters thomas at python.org
Mon Mar 24 11:29:33 CET 2008


On Mon, Mar 24, 2008 at 2:30 AM, Jean-Paul Calderone <exarkun at divmod.com>
wrote:

> On Mon, 24 Mar 2008 00:14:13 +0100, "\"Martin v. Löwis\"" <
> martin at v.loewis.de> wrote:
> >> You are still only seeing this as a case of libraries with a small
> >> number of people developing them and making regular well defined
> >> releases. That is not how the world I am talking about looks.
> >
> >Can you give me examples of such software? Are you perhaps talking
> >about closed source software?
>
> I'm not sure what software he was talking about.  I can say that for
> the work I do on both Twisted and Divmod software, I'd be quite happy
> to see this feature.  As either part of a migration path towards 3k
> _or_ as a feature entirely on its own merits, this would be very useful
> to me.
>
> I'm a bit curious about why Thomas said this sort of thing results in
> fragile code.  Twisted has been using __future__ imports for years and
> they've never been a problem.  Twisted currently supports Python 2.3
> through Python 2.5, and the only thing that's really difficult about
> that is subtle changes in library behavior, not syntax.
>

I wasn't talking about future imports. I was talking about writing Python
2.6 code and expecting it to work *the same way* in 3.0 without
modification. It requires all programmers working on the project to have
knowledge of how 3.0 and 2.6 differ. *I* can't even look at code and tell
you how 2.6 and 3.0 will differ. Since Lennart was talking specifically
about projects with a large number of developers, I do not believe this is a
safe assumption to make. A simple preprocessor step involving 2to3 requires
no such knowledge. Or, alternatively, a preprocessor step involving 3to2,
which I think will result in better code. Unfortunately I don't have time to
work on either anytime soon.

-- 
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080324/982885b2/attachment-0001.htm 


More information about the Python-Dev mailing list