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/2006-July/067054.html below:

[Python-Dev] Explicit Lexical Scoping (pre-PEP?)

[Python-Dev] Explicit Lexical Scoping (pre-PEP?) [Python-Dev] Explicit Lexical Scoping (pre-PEP?)Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jul 6 02:33:39 CEST 2006
skip at pobox.com wrote:

> By naming the function in which the binding is to occur you avoid problems
> of someone coming along and adding or deleting functions between the
> assignment (in baz) and the target of the assignment (x in foo) but then
> forgetting to increment or decrement the counters that refer to a fixed
> number of levels above the current function.

But it doesn't do anything for the (I expect much more
common) case of factoring out something in a function body
and making it a nested function -- you'd still have to
change the form of all the references to the name in
that case.

Better not to have a scheme that uses counters or
scope names at all, I think.

--
Greg
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