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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4