Why use classmethod instead of staticmethod? [duplicate]
问题 This question already has answers here : Difference between staticmethod and classmethod (25 answers) Closed 6 years ago . I know what they do and I've seen many examples of both, but I haven't found a single example where I would have to use classmethod instead of replacing it with a staticmethod . The most common example of classmethod I've seen is for creating a new instance of the class itself, like this (very simplified example, there's no use of the method atm. but you get the idea):