[Python-Dev] Continuing 2.x

Barry Warsaw barry at python.org
Fri Oct 29 21:21:25 CEST 2010

On Oct 29, 2010, at 12:43 PM, Casey Duncan wrote:

>I like Python 3, I am using it for my latest projects, but I am also keeping
>Python 2 compatibility. This incurs some overhead, and basically means I am
>still really only using Python 2 features. So in some respects, my Python 3.x
>support is only tacit, it works as well as for Python 2, but it's not taking
>advantage of Python 3 really. I haven't run into a situation yet where I
>really want to or have to use Python 3 exclusive features, but then again I'm
>not really learning to use Python 3 either, short of the new C api.

One thing that *might* be interesting to explore for Python 3.3 would be
something like `python3 --1` or some such switch that would help Python 2 code
run more easily in Python 3.  This might be a hook to 2to3 or other internal
changes that help some of the trickier bits of writing cross-compatible code.

I don't know what those things enabled by --1 would be.  Some syntactic things
might be fairly easy though largely inconsequential (e.g. print() -> print).
It might be that large changes like bytes/string dwarfs syntactic sugar.  I
had a brief conversation with Michael Foord yesterday and he's writing code
that works in 2.4 through 3.2, so for *some* code bases, it's tricky and ugly,
but possible.

IMHO, those are the kinds of directions we should be thinking about, to help
existing code more easily make the jump to Python 3.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101029/0be1dd55/attachment-0001.pgp>

More information about the Python-Dev mailing list