How can I overload the (+, -, *, /, ... , //) operators on an object in python.
Example:
a = Vector(3, 5)
b = Vector(2, 7)
print(a + b) # Output: <Vector (5.000000, 12.000000)>
print(b - a) # Output: <Vector (-1.000000,...
asked by
12.08.2018 / 02:38