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

[Python-Dev] closure semantics

[Python-Dev] closure semantics [Python-Dev] closure semanticsGreg Ewing greg at cosc.canterbury.ac.nz
Sat Oct 25 18:22:38 EDT 2003
> It's complex. Can you explain the complete semantics of 'outer' as simply as:
> 
>     global <name> [in <scope>]
> 
>     Binds and uses <name> in another scope. If 'in <scope>' is omitted
>     then the name is bound and used in the scope of the current module.

  global <name>

  Assignments to <name> rebind it in the next outer scope where it is 
  already bound, or in the module scope if there is no existing binding.

Seems about the same length as yours.

>   <include warnings about introducing the name into a scope between the
>   current scope and the scope where the programmer was expecting the
>   name to be bound>

Such comments belong in warning messages about the change issued
during the transitional phase, not in the language definition.

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