Same name for classmethod and instancemethod
Class and instance methods live in the same namespace and you cannot reuse names like that; the last definition of id will win in that case. The class method will continue to work on instances however, there is no need to create a separate instance method; just use: class X: @classmethod def id(cls): return cls.__name__ … Read more