The purpose of the
classmethod() function is to
convert a method into a class method.
For a discussion of the purpose and usage of class methods,
see Section 26.5, “Class methods”.
There are two ways to declare a class method within a class:
You can use the function decorator syntax to declare that
classmethod is a decorator for your
method. Precede the method definition with a line reading:
In some older versions of Python without the decorator
syntax, you can still declare a class method by
placing a line after the method definition, at the
same indentation level as the method's
statement, having this form: