How are lambda expressions bound to a class?
<p>If I set up a class like below in Python, as I expect the lambda expressions created should be bound to the class A. I don't understand why when I put a lambda inside a list like in <code>g</code> it isn't bound.</p>

<pre><code>class A(object):
  f = lambda x,y: (x + y)
  g = [lambda x,y: (x + y)]


a = A()

#a.f bound
print a.f
&lt;bound method A.&lt;lambda&gt; of &lt;__main__.A object at 0xb743350c&gt;&gt;

#a.g[0] not bound
print a.g[0]
&lt;function &lt;lambda&gt; at 0xb742d294&gt;
</code></pre>

<p>Why is one bound and not the other?</p>
