title: Python list comprehension with lambdas
body: <p>I'm running Python 3.4.2, and I'm confused at the behavior of my code. I'm trying to create a list of callable polynomial functions with increasing degree:</p>
  
  <pre><code>bases = [lambda x: x**i for i in range(3)]
  </code></pre>
  
  <p>But for some reason it does this:</p>
  
  <pre><code>print([b(5) for b in bases])
  # [25, 25, 25]
  </code></pre>
  
  <p>Why is <code>bases</code> seemingly a list of the last lambda expression, in the list comprehension, repeated? </p>