Classes
Creating Classes
class ClassName:
...Instanciate it
obj = ClassName()__init__() function
class MyClass:
__init__(self, otherParams):
self.something = otherParams
obj = MyClass('someValue')__str__() function
__str__() functionself parameter
self parameterInheritance
Overwriting the parent constructor
Overwriting but also calling the parents constructor
Polymorphism
Last updated