[Python-Dev] order of decorator application?

Jewett, Jim J jim.jewett at eds.com
Tue Mar 23 12:48:01 EST 2004


Skip:

> Is there a concensus on the order of application for decorators? 

I think people will accept either; the question is what counts as
"first".

In
	name = a(b(c(name)))

Is a first because it appears (and is resolved) first, or is c
first because it is applied first?

This also interacts with whether the decorators are before or
after the function name, and with whether we're modelling

	name = a(name)
	name = b(name)
	name = c(name)

or

	name = a(b(c(name)))

-jJ



More information about the Python-Dev mailing list