Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 791 Bytes

class_inheritance.md

File metadata and controls

7 lines (5 loc) · 791 Bytes

Class inheritance

TODO: ADD MORE

  • The default __str___ method is inherited from Object, which every class in Python inherits from. (See: inheritance) phone-number
  • a "subclass" will inherit all methods, attributes from it's parent class, and can then override methods as needed. Overriding means the logic in the parent class is not used. The super builtin function (not shown here) exists to allow the programmer to defer logic up the inheritance chain to the parent class when needed. phone-number
  • the knowledge of inheritance can be useful in this exercises because all Exceptions types inherit from the base class variable-length-quantity