[Python-Dev] syntactic sugar idea for {static,class}methods (original) (raw)
Skip Montanaro skip@pobox.com
Tue, 12 Feb 2002 12:29:37 -0600
- 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 ]
MH> class C(object):
MH> def static(arg) [staticmethod]:
MH> return 1 + arg
BAW> Why the square brackets though?
I believe Guido addressed this in his DevDay presentation. The list construct is to allow future extensions without requiring parser changes.
Skip
- 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 ]