Nested scopes resolution -- you can breathe again!

William Tanksley wtanksle at dolphin.openprojects.net
Fri Feb 23 14:57:34 EST 2001


On Thu, 22 Feb 2001 21:59:26 -0500, Guido van Rossum wrote:

>    import __nested_scopes__
>    from __future__ import nested_scopes

I like the second version.  That's quite cool.

Can I import stock market quotes from the future, too?  I'm sure that's
going to be a FAQ.  Come to think of it, perhaps __features__ is a better
name than __future__.

And perhaps _old_ code should bear the brunt of the change, with one of
the features being old_unnested_scoping. This way we don't have to keep a
default that's deprecated forever.

So we'd never see the line "from __features__ import nested_scoping"; that
would become an anachonism, and would quickly get irritating.  Instead,
we'd see "from __features__ import old_unnested_scoping" at the head of
modules which won't compile without warning.

>We also believe that the magical import mechanism is useful enough to
>be reused for other situations like this; Tim will draft a PEP to
>describe in excruciating detail.

>I thank everybody who gave feedback on this issue.  And thanks to
>Jeremy for implementing nested scopes!

Absolutely.  I'm very glad that nested scopes are here at last.

>--Guido van Rossum (home page: http://www.python.org/~guido/)

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list