[Python-ideas] add a single __future__ for py3?

Chris Angelico rosuav at gmail.com
Mon Sep 21 15:02:27 CEST 2015


On Mon, Sep 21, 2015 at 7:56 PM, Andrew Barnert via Python-ideas
<python-ideas at python.org> wrote:
> I thought maybe many-worlds could help, so I tried "from __alternate_timeline__ import *" first, but then I got "parse error on input\nFailed, modules loaded: none", and then my kernel panicked with a type error (needs more monads)".
>

Your kernel isn't multitimeline compliant. Try recompiling it with the
--with-polyads option, and make sure you don't use an ad-blocker.

Dragging this thread back to some semblance of serious discussion...
An alias like "py3" could be well-defined, but still rather not - and
definitely not the star-import. Even adding an alias would be a
problem for compatibility, because there would be Python versions that
suddenly fail. Currently, future features monotonically increase as
Python versions increase, so if "from __future__ import
barry_as_FLUFL" works on 3.3.6, I would expect it to work on 3.4.1 as
well. Adding an alias to 2.7.11 would mean adding it also to bugfix
releases in the 3.x line, so "from __future__ import py3" would break
on certain bugfix releases of all versions of Python until 3.6, at
which point it would be available. Do you really want your code to run
fine on 3.5.1 and 3.4.3, but not on 3.5.0? That would be a nightmare
to deal with, unless you're writing code for 2.7.11+/3.6+.

ChrisA


More information about the Python-ideas mailing list