That's a much better idea!

Sent from my digital lollipop.

On Oct 29, 2010, at 3:31 PM, Ian Bicking <ianb@colorstudy.com> wrote:

On Fri, Oct 29, 2010 at 12:21 PM, Barry Warsaw <barry@python.org> wrote:
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.

More useful IMHO would be things like "from __past__ import print_statement", still requiring some annotation of code to make it run, but less invasive than translating code itself.  There's still major things you can't handle like that, but if something is syntactically acceptable in both Python 2 and 3 then it's a lot easier to apply simple conditionals around semantics.  This would remove the need, for example, for people to use sys.exc_info() to avoid using "except Exception as e".

--
Ian Bicking  |  http://blog.ianbicking.org