Martin Zarate wrote: > Why not use the underused "as" keyword for decorators? > > That is, > > def foo(bar, baz) as StaticMethod: > > It would be very handy for classes, as I've worked with custom class > structures (such as an overcomplicated interface-based structure that I was > experimenting with) that it would be useful for. > I think Guido has said no more syntax ideas on this one. It's either before the 'def', after the argument list, or like Java 1.5 . > Are there plans to extend this to fully custom blocks and statements like in > Ruby? Or will it only be for modified def and class statements? > Since Python does not have blocks like Ruby this is a moot point at the moment. If Python grows blocks like Ruby it can be determined then. As it stands now it is only meant for functions and methods. -Brett
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