install a cleanup handler for nontrivial lambda closures

This commit is contained in:
Wenzel Jakob
2015-10-13 17:37:25 +02:00
parent 28f98aa298
commit 19208fe9a4
4 changed files with 42 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ from example import test_callback1
from example import test_callback2
from example import test_callback3
from example import test_callback4
from example import test_cleanup
def func1():
print('Callback function 1 called!')
@@ -38,3 +39,5 @@ print(test_callback2(func2))
test_callback3(lambda i: i + 1)
f = test_callback4()
print("func(43) = %i" % f(43))
test_cleanup()