Erik Bray wrote:
I think Guido may have a point about not allowing any arbitrary
expression.  But I do think that if it allows calls, it should also at
least support the itemgetter syntax, for which there seems to be a
demonstrable use case.  But that's just adding on another special
case, so it might be simpler to allow arbitrary expressions.

It's not the same issue, of course, but note that str.format's object specification "language" supports item and attribute access. And that's the extent of what it allows.

If you wanted to do this for decorators, I'm not sure how easy it would be to restrict the expression inside the brackets, or if you'd even want to. str.format has all of this baked-in, it doesn't use any sort of grammar.

Eric
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to