You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
152 B
12 lines
152 B
11 years ago
|
# test nested functions and scope
|
||
|
|
||
|
def f(x):
|
||
|
def f2(y):
|
||
|
return y + x
|
||
|
print(f2(x))
|
||
|
return f2
|
||
|
x=f(2)
|
||
|
print(x, x(5))
|
||
|
f=123
|
||
|
print(f(f))
|