[Python-Dev] Re: Static method and class method comments
Guido van Rossum
guido at python.org
Thu Jul 26 09:50:29 EDT 2001
Skip Montanaro <skip at pobox.com> writes:
> Even better yet, why not simply reuse the class keyword in this context:
>
> class C:
> def class foo(x, y):
> print "classmethod", x, y
I'm not convinced we need new syntax for this, since I think it's a
rarely used feature, but here's a syntax proposal due to Jack Jansen
that I like better:
class C:
def foo(class, x, y): "this is a static method"
def foo(class c, x, y): "this is a class method"
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list