[Tutor] what do you use @staticmethod for?
spir
denis.spir at free.fr
Wed Nov 19 23:07:06 CET 2008
Good night,
I have not yet found any use for this feature.
Also, I do not really understand the difference with @classmethod, from the
programmer's points of view (even if I get the difference on the python side).
As I see it, a classmethod is a very ordinary method, except its 'owner' is a
type. [But we cannnot express its definition with standard syntax, because it
conflicts with instance method definition syntax.]
I would be pleased to read your views about staticmethods, and the use cases
you have for them -- that could not be done (the same way) with classmethods.
Thank you,
Denis
More information about the Tutor
mailing list