MemotivaClass methods, static methods, and metaclasses

What is a class method?

Class methods, static methods, and metaclasses

Audio flashcard · 0:13

Nortren·

What is a class method?

0:13

A class method is a method that receives the class as its first argument instead of an instance. It is declared with the classmethod decorator. Class methods are commonly used as alternative constructors and for operations that act on the class itself rather than an instance.
docs.python.org