@staticmethod def make_sound(cls):
Should cls be passed into a staticmethod? I thought that was only for class methods
cls
I cannot believe it! I actually missed that little detail: @staticmethod and @classmethod are actually two separate things!
@staticmethod
@classmethod
I've just edited the article to correct that, and added a new section to clarify the difference. Thank you so much for correcting that.
Great article!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Should
cls
be passed into a staticmethod? I thought that was only for class methodsI cannot believe it! I actually missed that little detail:
@staticmethod
and@classmethod
are actually two separate things!I've just edited the article to correct that, and added a new section to clarify the difference. Thank you so much for correcting that.
Great article!