If I set up the class as shown below in Python, since I expect the created lambda expressions to be bound to class A. I donβt understand why, when I put the lambda inside the list, like in g , it isnβt bound .
class A(object): f = lambda x,y: (x + y) g = [lambda x,y: (x + y)] a = A()
Why one binding and not another?
Mike
source share