title: __radd__ function in python and return statement
body: <p>I am an absolute beginner in Python. I am trying to wrap my head around <code>__radd__</code> function. I read <a href="https://stackoverflow.com/questions/27586663/can-radd-work-with-the-operands-in-any-order">Can __radd__ work with the operands in any order?</a> and understand that <code>radd</code> is used to tell the operator that "my object is on the right-hand side". The issue is that for one of the code snippets below (adopted from Lutz' Learning Python Book), <code>radd</code> throws a <code>RecursionError</code>.</p>
  
  <pre><code>class Commuter3:
      def __init__(self, val):
          self.val = val
      def __add__(self, other):
          print('add', self.val, other)
          return self.val + other
      def __radd__(self, other):
          print('radd was called') 
          return other + self #this return statement is problematic
  </code></pre>
  
  <p>Now, let's see whether <code>__radd__</code> is able to add the two objects.</p>
  
  <pre><code>#Testing
  x3 = Commuter3(13)
  y3 = Commuter3(23)
  x3+y3
  </code></pre>
  
  <p>Here's the output</p>
  
  <pre><code>...RecursionError: maximum recursion depth exceeded
  </code></pre>
  
  <p>Here's the expected output: I got this by changing <code>return other + self</code> to <code>return self + other</code></p>
  
  <pre><code>add 13 &lt;__main__.Commuter3 object at 0x0000014B329E74A8&gt;
  radd was called
  add 23 13
  Out[64]: 36
  </code></pre>
  
  <p>Can someone please explain why that return statement throws stack overflow error? How could I mitigate it? I believe I am missing some concept here. Thanks in advance for helping me out.</p>