Notebook
def __init__(self, v0): self.v0 = v0 self.g = 9.81
Y.__init__(y, 3) # is the logic behind Y(3)
def value(self, t): return self.v0*t - 0.5*self.g*t**2
v = y.value(t=0.1)
return y.v0*t - 0.5*y.g*t**2
def __init__(self, ...) def __call__(self, ...) def __add__(self, other)
y = Y(4)
Y.__init__(y, 4)
print(a)
c=a+b # c = a.__add__(b) c=a-b # c = a.__sub__(b) c = a*b # c = a.__mul__(b) c = a/b # c = a.__div__(b) c = a**e # c = a.__pow__(e)
a == b # a.__eq__(b) a != b # a.__ne__(b) a < b # a.__lt__(b) a <= b # a.__le__(b) a > b # a.__gt__(b) a >= b # a.__ge__(b)