Is it bad form to call a classmethod as a method from an instance?

If you are tempted to call a class method from an instance you probably don’t need a class method.

In the example you gave a static method would be more appropriate precisely because of your last remark (no self/cls interaction).

class C(object):
    @staticmethod
    def f(x):
       return x + x

this way it’s “good form” to do both

c = C()
c.f(2)

and

C.f(2)

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.