To define an old-style class with no parent class, use
this general form:
C
classC: ...class methods and variables...
To create a class that inherits from one or more parent
classes , P1,
…:
P2
classC(P1,P2, ...): ...class methods and variables...
As Python reads the definition of your class, it
first creates a new, empty namespace called the
class namespace. You can
access the class namespace directly as an
attribute named __dict__, a dictionary
whose keys are the names in that namespace.
As Python reads each method or class variable in your class declaration, it adds the name of that method or variable to the class namespace.