title: Inconsistent behavior concatenating lists and tuples in python
body: <p>I noticed a surprising behavior when trying to concatenate lists and tuples.  </p>
  
  <p>Usually, they don't mix: </p>
  
  <pre><code>(0, 1) + [2, 3]
  </code></pre>
  
  <p>results in:</p>
  
  <blockquote>
    <p>TypeError: can only concatenate tuple (not "list") to tuple</p>
  </blockquote>
  
  <p>and, vice versa </p>
  
  <pre><code>[0, 1] + (2, 3)
  </code></pre>
  
  <p>gives: </p>
  
  <blockquote>
    <p>TypeError: can only concatenate list (not "tuple") to list</p>
  </blockquote>
  
  <p>So far, nothing was unexpected.
  However, if you use a variable assignment via "+=", the behavior for lists changes!</p>
  
  <pre><code>l = [0, 1]
  l += (2, 3)
  l
  </code></pre>
  
  <p>gives</p>
  
  <blockquote>
    <p>[0, 1, 2, 3]</p>
  </blockquote>
  
  <p>But not for tuples: </p>
  
  <pre><code>t = (0, 1)
  t += [2, 3]
  t
  </code></pre>
  
  <p>still produces an error:</p>
  
  <blockquote>
    <p>TypeError: can only concatenate tuple (not "list") to tuple</p>
  </blockquote>
  
  <p>Of course, there is no practical problem here, but I'm curious: 
  What's going on there?</p>