I understand what are lambda functions in Python, but I can’t find what is the meaning of ‘lambda binding’ by searching the Python docs. A link to read about it would be great. A trivial explained example would be even better. Thank you.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, a general definition:
Now, there is an excellent python example in a discussion here:
‘…there is only one binding for
x: doingx = 7just changes the value in the pre-existing binding. That’s whyreturns two functions that both return 7; if there was a new binding after the
x = 7, the functions would return different values [assuming you don’t call foo(7), of course. Also assuming nested_scopes]….’