[Python-ideas] A "local" pseudo-function

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 1 02:06:06 EDT 2018

Steven D'Aprano wrote:
> Pascal, for example, had lexical scoping back in the 1970s, but 
> no closures.

Well, it kind of had a limited form of closure. You could pass
a procedure or function *in* to another procedure or function
as a parameter, but there was no way to return one or pass it
out in any way. This ensured that the passed-in procedure or
function couldn't outlive its lexical environment.


More information about the Python-ideas mailing list