Closure (computer programming): Difference between revisions

Content deleted Content added
m Reverted edits by 85.129.40.72 (talk) (HG) (3.4.10)
Anonymous functions: Add comments
Tags: Reverted Mobile edit Mobile web edit
Line 23:
def g(y):
return x + y
return g # Return a closure. This requires review: is g a closure or is f a closure? The rest of the section in this python example suggests “f assigning x with 1” is a closure
return g # Return a closure.
 
def h(x):