[Python-Dev] future and present
Guido van Rossum
guido@python.org
Fri, 10 Aug 2001 17:01:11 -0400
> If a script has
> from __future__ import nested_scopes
> and is run by Python 2.2, should the interpreter complain?
Of course not! The whole point of the future statement is that it
should be harmless once you're *in* that future (unless the future
feature ends up retracted -- think of it as an alternate universe, a
side effect of time machine misuse :-).
> The PEP says "the compiler knows which features names have been
> defined, and raises a compile-time error if a future_statement
> contains a feature not known to it." I think I'd interpret this as:
> nested_scopes is known to 2.2 (and redundant since the feature is
> now mandatory), therefore the compiler does nothing.
Correct.
--Guido van Rossum (home page: http://www.python.org/~guido/)