Guido van Rossum <guido at python.org> writes: >> > I think this is too far-fetched to consider as an alternative to the >> > humble @decorator. >> >> Maybe, but if you're still serious about improving support for >> domain-specific embedded languages in Python you ought to give the >> ideas another look. If a reasonable syntax for decorators falls out >> of a more general and useful mechanism, so much the better. > > How does > > decorate <expr>, ...: > <block> > > improve support for domain-specific embedded languages? I was thinking -- as well as I could through yesterday's allergy attack -- more of the some-decorator: <block> form, which allows people to create pseudo-statements of various kinds. Probably Bob I. is right that it doesn't help as much as it might if <block> is executed before some-decorator is invoked. That said, maybe it's possible to pass the *code* for the block to some-decorator in this scenario. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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