Why is __radd__ not working
<p>HI</p>

<p>Trying to understand how <code>__radd__</code> works. I have the code</p>

<pre><code>&gt;&gt;&gt; class X(object):
    def __init__(self, x):
        self.x = x
    def __radd__(self, other):
        return X(self.x + other.x)


&gt;&gt;&gt; a = X(5)
&gt;&gt;&gt; b = X(10)
&gt;&gt;&gt; a + b

Traceback (most recent call last):
  File "&lt;pyshell#8&gt;", line 1, in &lt;module&gt;
    a + b
TypeError: unsupported operand type(s) for +: 'X' and 'X'
&gt;&gt;&gt; b + a

Traceback (most recent call last):
  File "&lt;pyshell#9&gt;", line 1, in &lt;module&gt;
    b + a
TypeError: unsupported operand type(s) for +: 'X' and 'X'
</code></pre>

<p>Why is this not working? What am I doing wrong here?</p>
