Function decorator that caches function results

Piet van Oostrum piet at cs.uu.nl
Sun Oct 9 16:04:36 EDT 2005


>>>>> Steven D'Aprano <steve at REMOVETHIScyber.com.au> (SD) wrote:

>SD> [penny drops] Now we're getting somewhere... a closure is something
>SD> _added_ to a function. So we should talk about functions-without-closures
>SD> and functions-with-closures.

Well, I have never heard that definition. For more than half of my life I
only have heard the definition that a closure is the combination of a
function (i.e. its code) plus an environment containing the unbound
variables. Depending on the language the variables may be bound to values,
memory locations or some other things.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list