Possible PEP: Improve classmethod/staticmethod syntax
Gerrit Holl
gerrit at nl.linux.org
Wed Jun 4 05:18:29 EDT 2003
Hi,
Bryan schreef op woensdag 4 juni om 06:11:23 +0000:
> ok, i understand what you mean now. but, in a way, it seems that we are
> playing symantec games here. from a programmers prespective, it looks and
> feels like a keyword.
>
> style 1:
> def myMethod(args) [staticmethod]:
> blah, blah, blah
>
> style 2:
> def staticmethod myMethod(args):
> blah, blah, blah
style 3:
def myMethod(args)(staticmethod):
blah, blah, blah
style 4:
def staticmethod(myMethod(args)):
blah, blah, blah
BTW, what would happen if a modifier is applied that doesn't return
a callable (like def foo(args)(str):)? Would it raise an exception or
bind a string to 'foo', ignoring the contents of the 'def' declaration?
> but i have to vote -1 on style one, +1 on style 2, +0 keeping it the way it
style 1: -1
style 2: +0
style 3: +1
style 4: +0
for me
yours,
Gerrit.
--
149. If this woman does not wish to remain in her husband's house, then
he shall compensate her for the dowry that she brought with her from her
father's house, and she may go.
-- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/
More information about the Python-list
mailing list