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
- CS50P (Harvard online course)
- Classes and Objects — the Basics
- Classes and Objects — Digging a little deeper