Some language proposals.

Jacek Generowicz jacek.generowicz at
Wed Feb 25 15:04:36 CET 2004

Michael Hudson <mwh at> writes:

> Jacek Generowicz <jacek.generowicz at> writes:
> > "Terry Reedy" <tjreedy at> 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