[Python-ideas] A "local" pseudo-function

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Apr 29 01:19:37 EDT 2018


Tim Peters wrote:
> (ABC had
> no lexical scoping either - nor, if I recall correctly, even textual
> nesting of its flavor of functions).

If Python hadn't allowed textual nesting either, folks
might have been content to leave it that way. But having
textual nesting without lexical scoping was just weird
and confusing!

 > A great many functions are in fact
> ... functions ;-)  That is, they compute a result from the arguments
> passed to them.  They don't need more than that,

Yes, but they often make use of other functions to do
that, and not being able to call other local functions
in the same scope seemed like a perverse restriction.

-- 
Greg



More information about the Python-ideas mailing list