[Python-ideas] Tweaking closures and lexical scoping to include the function being defined

Guido van Rossum guido at python.org
Tue Sep 27 19:12:43 CEST 2011

On Tue, Sep 27, 2011 at 3:08 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> As I see it, there are 3 possible ways to approach this feature, and
> they vary mainly in terms of when the initialisation expressions get
> evaluated:
> 1. Prior to function definition (i.e. the same as default argument values)
> 2. After function definition but before decorators are applied
> 3. After decorator application

Undoubtedly #1 is the way to go.

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list