Next / Previous / Contents / Shipman's homepage

21.3. classmethod(): Create a class method

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: