[Python-Dev] syntactic sugar idea for {static,class}methods (original) (raw)
David Ascher DavidA@ActiveState.com
Tue, 12 Feb 2002 11:10:25 -0800
- Previous message: [Python-Dev] syntactic sugar idea for {static,class}methods
- Next message: [Python-Dev] syntactic sugar idea for {static,class}methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Michael Hudson wrote:
Some time ago, Gareth McCaughan suggested a syntax for staticmethods. You'd write class C(object): def static(arg) [staticmethod]: return 1 + arg C.static(2) => 3
Nice!
Note that this is quite similar to the [WebMethod] in C#, VB.Net, etc. , and indeed we could have [webmethod] for some variation of a SOAP/RPC interface.
- Previous message: [Python-Dev] syntactic sugar idea for {static,class}methods
- Next message: [Python-Dev] syntactic sugar idea for {static,class}methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]