[Python-Dev] metaclass insanity (original) (raw)
Guido van Rossum guido@python.org
Tue, 05 Nov 2002 11:52:46 -0500
- Previous message: [Python-Dev] metaclass insanity
- Next message: [Python-Dev] metaclass insanity
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I don't think it makes much sense to call all Python functions > closures.
I was taught that a closure is a first class function or object that holds references to its own lexically defined namespace(s). So as I understand it, they are closures, though limited to only two levels of lexical scope (or three if you count the builtin scope).
You're behind the times. Python 2.2 (and 2.1 if you did "from future import namesepaces") allows references to outer functions as well.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] metaclass insanity
- Next message: [Python-Dev] metaclass insanity
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]