Jim Fulton wrote: > In particular: > > def name(arg, ...) [expr1, expr2, expr3]: > ...body... > > would be equivalent to (some variation on): > > def name(arg, ...): > ...body... > > name=expr1(expr2(expr3(name))) With Michael's patch (which indeed still works) it's actually name = expr3(expr2(expr1(name))) > I wonder if the same mechanism could be used in class statements. > If I had this, I might say what interface a class implements > with: > > class foo(spam, eggs) [implements(IFoo, IBar)]: > body of class > > or (wo parens): > > class foo [implements(IFoo, IBar)]: > body of class I don't know how Zope interfaces work, but I can imagine the following could be made to work as well: class foo(spam, eggs) [IFoo, IBar]: body of class I think this would be wonderful. Would someone be interested in extending Michael's patch to also cover the class statement? Just
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