Other situations like this (was RE: [Python-Dev] Nested scopes resolution -- you can breathe again!)

Tim Peters tim.one@home.com
Fri, 23 Feb 2001 20:23:19 -0500


Jeremy]
> Hmmmm...  I'm not yet sure how to deduce indent level 0 inside the
> parser.
>
> Were we going to allow?
>
> try:
>     from __future__ import curly_braces
> except ImportError:
>     ...

Sounds like that's easier to implement <0.5 wink>.  Sure.  So let's take the
human view of "module-level" instead of the tabnanny view after all.  That
way I don't have to change the words in the proto-PEP either <ahem>.  That
means:

if x:
    from __future__ import nested_scopes

should work too.

Does it also mean

exec "from __future__ import nested_scopes\n"

should work?  No.