[Python-Dev] PEP 318 - generality of list; restrictions on elements

Guido van Rossum guido at python.org
Wed Mar 10 11:56:04 EST 2004


> That still leaves the question for what *is* allowed within the
> brackets.  AFAICT, the options are
> 
> * A single identifier (which must be a callable)
> 
> * Comma-separated list of identifiers (which must be callables)
> 
> * Arbitrary expression (which must produce a sequence of callables)

The latter.  I previously mentioned a use case for allowing a function
call (or class constructor) here.

> BTW, have we agreed on the order in which decorators will be applied?

I think I've said in the past left-to-right, but since we're talking
function application here, right-to-left might also work.  And it's
also possible that decorators are (by convention) commutative, making
it a wash.  It's a concern that there's no clear reason to prefer one
order!  We'll have to come up with some use cases.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list