Object-Oriented Programming (OOP)


Concepts

  • why not lists and dictionaries?
  • encapsulation (bundling data and methods that operate on the data)
  • classes and objects
  • attributes (instance variables)
  • methods (like functions)
  • special methods: __init__, __str__
  • inheritance: super().__init__()
  • operator overloading: e.g. __add__, __eq__

Resources on OOP

example code from class