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

Chris Angelico rosuav at gmail.com
Mon Sep 21 10:02:34 CEST 2015


On Mon, Sep 21, 2015 at 4:21 PM, Random832 <random832 at fastmail.com> wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>> 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. Effectively, that directive would say "hey, you know
>> that __future__ feature, well, I'd rather just not bother - get the
>> breakage right away". Kinda defeats the purpose :)
>
> Yeah, well, that won't be a problem for this use case until Python 2.8
> comes out. Or do we expect *new* __future__ features to be added to
> maintenance releases of Python 2.7?

The whole point of this is to be compatible also with Python 3, and
new future directives can be added there. So your from __future__
import * would trigger generator_stop on 3.5, for instance.

ChrisA


More information about the Python-ideas mailing list