I am trying to add a class object with a number, but I'm confused on how to go about adding a class object with two numbers. For example, this is my hypothetical add class method:
class A:
def __add__(self, b):
return something
I know how to add this so far:
a = A()
print(a + 1)
But, what if I want to add it like this?
a = A()
print(a + 1 + 2)
Should I use *args for the add class method?