Q:

Method __add__ in a class

In a normal class I use the method __add__ with this form
class MyNum:
    def __init__(self,num):
        self.num=num
    def __add__(self,other):
        return MyNum(self.num+other.num)
    def __str__(self):
        return str(self.num)

But, if I have an __init__ without input (only self), like this:
class MyNum:
    def __init__(self):
      self.num = num
    def __add__(self, other):
      ?

How do I use this method in this class? If I use: return MyNum(self.num+other.num) I get an error about __init__ taking exactly one argument, two given.

A:

By returning MyNum(self.num + other.num) you are passing the result of self.num + other.num to the constructor of MyNum.
If you want your __add__ method to return a new instance of MyNum, and continue to pass in that value to the constructor, it will have to accept it as part of its __init__.
Alternatively, you could instance MyNum, and add the .num attribute manually:
class MyNum(object):
    def __init__(self):
        self.num = 0
    def __add__(self, other):
        temp_mynum = MyNum()
        temp_mynum.store_num(self.num + other.num)
        return temp_mynum
    def store_num(self, value):
        self.num = value

You would then of course have to add the num attribute to any time you instance the MyNum object in your general code:
def foo():
    value_in_function = MyNum()
    value_in_function.value(7)
    use_it(value_in_function)

