Python static methods - how to call a method from another method -


When I have regular methods to call another method in class, I have to do this

<

But when I have static methods I

  Can not write self.dosomethingelse ()  

because there is no example I want to call a static method from another static method of the same class, how do I do it in Python?

Edit: Is there a mess, okay, I have edited this question back on the original question. I already have another question which is in the comments of Peter Hansen. If you think I should open another question for an answer already, please let me know.

Class.method should work.

someClass: @classmethod def some_class_method (CLS): pass @staticmethod def some_static_method (): SomeClass.some_class_method () SomeClass.some_static_method ()

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -