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/039403.html below:

[Python-Dev] Re: closure semantics

[Python-Dev] Re: closure semantics [Python-Dev] Re: closure semanticsGuido van Rossum guido at python.org
Thu Oct 23 18:08:58 EDT 2003
> However, as long as we're talking about this stuff, I wish I could
> write "global foo" at module scope and have that mean "this variable
> is to be treated as global in all functions in this module".

This is similar to Greg Ewing's proposable to have 'rebindable x' at
an outer function scope.  My problem with it remains:

It gives outer scopes (some) control over inner scopes.  One of the
guidelines is that a name defined in an inner scope should always
shadow the same name in an outer scope, to allow evolution of the
outer scope without affecting local details of inner scope.  (IOW if
an inner function defines a local variable 'x', the outer scope
shouldn't be able to change that.)

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

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