Posts by Brendon Lincon • 1 point
1 post
-
-2
votes1
answer115
viewsQ: How to add 2 objects and return number, in Python?
I have the following class: class num(int): def __init__(self, n): self.n = n I would like it to work as follows: A = num(2) B = num(3) A + B = 5 This is part of a much more complex personal…