closure = decorator?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Oct 11 12:44:57 EDT 2013
On Fri, 11 Oct 2013 15:01:40 +0300, Jussi Piitulainen wrote:
> Steven D'Aprano writes:
>> Closures have nothing to do with *arguments*. A better definition of a
>> closure is that it is a function together with a snapshot of the
>> environment it was called from.
[...]
> Second, it's precisely not (a snapshot of) the environment where the
> function is *called* from, it's (a snapshot of) the environment where
> the function was *created* in. This is the whole *point*.
Ah yes, of course you are right. I actually knew that, it was a slip of
the brain that I wrote it wrong :-(
Thanks for the correction.
--
Steven
More information about the Python-list
mailing list