A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/039519.html below:

[Python-Dev] Re: Re: closure semantics

[Python-Dev] Re: Re: closure semantics [Python-Dev] Re: Re: closure semanticsGreg Ewing greg at cosc.canterbury.ac.nz
Sat Oct 25 18:51:50 EDT 2003
> But what about name mismatches?  Global statements allows functions to
> create 'new' variables in the module scope and not just 'existing'
> ones.  What about for in-between scopes?

It's probably a misfeature of the global statement that it allows
that, but if we're going to re-use it in the form of a "global x in
scope" statement, we should keep the behaviour the same for nested
scopes in the interests of consistency.

Maybe this is an argument for introducing an "outer" statement,
which requires an existing binding (determined by existence of
an assignment at compile time) even for the module scope, and
deprecating "global" altogether.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4