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

[Python-Dev] closure semantics

[Python-Dev] closure semantics [Python-Dev] closure semanticsJoshua Marshall jmarshal at mathworks.com
Thu Oct 23 13:42:23 EDT 2003
> [Jeremy]
> > I'm not averse to introducing a new keyword, which would address
both 
> > concerns.  yield was introduced with apparently little problem, so
it 
> > seems possible to add a keyword without causing too much disruption.
> > 
> > If we decide we must stick with global, then it's very hard to
address 
> > Alex's concern about global being a confusing word choice <wink>.

[Guido]
> OK, the tension is mounting.  Which keyword do you have in 
> mind?  And would you use the same keyword for module-globals 
> as for outer-scope variables?

I'd like to suggest "outer v" for this.  The behavior could be to scan
outward for the first definition of v.  If the only outer-scope variable
is at module-level, then the behavior would be the same as "global v".
Or if everyone is comfortable enough re-using the keyword "global", then
I also like "global v in f".

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