[Python-Dev] thunks

Samuele Pedroni pedronis@bluewin.ch
Tue, 4 Feb 2003 00:56:15 +0100


From: "Greg Ewing" <greg@cosc.canterbury.ac.nz>
> Guido:
>
> > If we want to support thunks that blend into the scope of their
> > environment as well as thunks that introduce a new local scope, here's
> > one possible way to do it:
>
> Do we actually want both kinds of thunk? Why, exactly?
>

The second kind (lambda) are  essentially just function objects and their
corresponding syntax is just sugar. We need a third too, because 'class' has
still different rules wrt scoping.

The first kind is needed to do even more general things than what 'with' would
allow. From the prososal it seems that now they cannot take parameters.