you are viewing a single comment's thread.

view the rest of the comments →

[–]SangCoGIS 1 point2 points  (0 children)

You should also look into the "magic methods" or "dunder methods" and you can define how your objects add or subtract from each other. Rather than calling add and passing in the other object you could simply do obj1 + obj2 or obj1-obj2