diff --git a/aula147.py b/aula147.py new file mode 100644 index 0000000..59dbb43 --- /dev/null +++ b/aula147.py @@ -0,0 +1,17 @@ +# Teoria: python Special Methods, Magic Methods ou Dunder Methods +# Dunder = Double Underscore = __dunder__ +# Antigo e Ăștil: https://rszalski.github.io/magicmethods/ +# https://docs.python.org/3/reference/datamodel.html#specialnames +# __lt__(self,other) - self < other +# __le__(self,other) - self <= other +# __gt__(self,other) - self > other +# __ge__(self,other) - self >= other +# __eq__(self,other) - self == other +# __ne__(self,other) - self != other +# __add__(self,other) - self + other +# __sub__(self,other) - self - other +# __mul__(self,other) - self * other +# __truediv__(self,other) - self / other +# __neg__(self) - -self +# __str__(self) - str +# __repr__(self) - str