`@staticmethod` is (almost?) always wrong in #Python. It doesn't take the object's state as an argument, which means it's just a plain function. The class name is only used for namespacing, but modules already do this.

The only reason that I know of why people keep writing them is being taught Java's version of OOP too early too deeply. Java uses classes as a namespacing primitive.

Follow

@isagalaev ... and Java's static methods are more analogous to Python's class methods, right?

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.