211028-1110 Python staticmethod vs classmethod
A @classmethod
gets the class as first parameter, nice for constructors/factories etc. A @staticmethod
doesn’t know anything about the class at all, and the only use it has is to put functions that logically belong to the class inside the class. 1
Additionally,
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus