Some language proposals.

Jacek Generowicz jacek.generowicz at cern.ch
Wed Feb 25 09:04:36 EST 2004


Michael Hudson <mwh at python.net> writes:

> Jacek Generowicz <jacek.generowicz at cern.ch> writes:
> 
> > "Terry Reedy" <tjreedy at udel.edu> writes:
> > 
> > > Nested functions are much rarer than unnested.  Needing to rebind an
> > > outer local, rather than merely read or mutate, is rarer still.

> > I sumbit to you that read-only closures are rare in Python because
> > they are a recent addition to the language.
> 
> Actually, I think uses of nested scopes are fairly common

While I don't pretend to have any idea how much the "typical" Python
programmer uses nested scopes, I am tempted to agree with you that
their use is quite common. However, I did not want to start a debate
(with Terry or anyone else) about the _absolute_ frequency of nested
functions, and so decided to phrase my statement in terms of an
agremment on the _relative_ infrequency of nested functions as
compared to unnested ones.

:-)



More information about the Python-list mailing list