Bengt Richter bokr at
Tue Mar 25 23:12:16 CET 2003

On Tue, 25 Mar 2003 18:11:29 GMT, "Max Khesin" <max at> wrote:

>"David Mertz" <mertz at> wrote in message
>news:mailman.1048614147.28046.python-list at
>> closure-specific like a "closure" keyword, or special syntax... there
>> are threads here every once in a while where someone proposes such a
>> thing, but I think it is unlikely to happen.
>Thanks - my whole research started out from reading your articles on FP :).
>Q-n: what would the "closure" keyword add that a nested scope cannot
To me, the question suggests that closures inevitably go with nested scopes,
which is not necessarily so (UIAM ;-) I.e., ISTM that nested scopes
in general (as opposed to Python's) don't necessarily require closures, unless
you allow references to nested function definitions to escape their enclosing
scope, and be used elsewhere (as Python does allow). Cf. Pascal?

Bengt Richter

More information about the Python-list mailing list