Newbie class questions

Greg Ewing greg.ewing at compaq.com
Sun Jun 13 18:19:04 EDT 1999


Toby Kelsey wrote:
> 
> (1) Is there a reason why I cannot call MyClass.q()?  Why require a
> meaningless instance arg to a class-static method?

There is no such thing as a class-static method in Python.
(There used to be, but Guido noticed that we were using
them and put some code in to stop them from working :-)

There are workarounds, but most of the time it's simpler
and clearer just to use a module-level function instead.

Greg




More information about the Python-list mailing list