class methods?

Tim Peters tim_one at email.msn.com
Thu Jan 13 03:04:02 EST 2000


[Stuart Zakon]
> Is there no such thing as class scope methods in Python?
> (Analogous to static methods in Java, C++).

Right, there is no such thing -- at least not directly.  See

    http://www.python.org/doc/FAQ.html#4.84

for the full answer.

> ...
> If I am missing something, I apologize, but coming from
> Java and C++ it just seemed natural to have this feature.

Well, it's a different language!  Try to meet it on its own terms at first;
if Guido liked other languages so much, he probably wouldn't have bothered
to create Python <wink>.

win-some-lose-some-ly y'rs  - tim






More information about the Python-list mailing list