The class inheritance mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same name.
The class definition looks like :
class Class_Name:
Statement 1
Statement 2
…….
Statement N
The statements inside a class definition will usually be function definitions, but other statements are also allowed. When a class definition is entered, a new namespace is created, and used as the local scope thus, all assignments to local variables go into this new namespace.
The class definition looks like :
class Class_Name:
Statement 1
Statement 2
…….
Statement N
The statements inside a class definition will usually be function definitions, but other statements are also allowed. When a class definition is entered, a new namespace is created, and used as the local scope thus, all assignments to local variables go into this new namespace.
Comments
Post a Comment