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

Andrew Barnert abarnert at yahoo.com
Mon Sep 21 11:56:56 CEST 2015


On Sep 20, 2015, at 22:15, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
> Chris Angelico wrote:
>>> On Mon, Sep 21, 2015 at 2:28 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>>> from __future__ import *
>> 
>> Even if it were made to work, though, it'd mean you suddenly and
>> unexpectedly get backward-incompatible changes when you run your code
>> on a new version.
> 
> Properly implemented, it would use the time
> machine module to find every feature that will
> ever be implemented in Python. So once you had
> updated your code to be compatible with all of
> them, it would *never* break again!
> 
> The neat thing is that it would take just one
> use of the time machine to backport this feature,
> and it would then bootstrap itself into existence.

Well, I just tested it with 2.7.0, and it doesn't give me any future flags at all. Which proves that Guido is going to reject the feature (because otherwise he will would have useding the time machine, and he hasn't doinged), so there's no point discussing it any further.

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)".


More information about the Python-ideas mailing list