Add callback examples with named parameters

This commit is contained in:
Brad Harmon
2016-06-16 13:19:15 -05:00
parent a62b3a07ba
commit 835fc06ca4
4 changed files with 26 additions and 2 deletions

View File

@@ -29,6 +29,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_callback5
from example import test_cleanup
def func1():
@@ -49,5 +50,7 @@ print(test_callback1(partial(func3, "Partial object with one argument")))
test_callback3(lambda i: i + 1)
f = test_callback4()
print("func(43) = %i" % f(43))
f = test_callback5()
print("func(number=43) = %i" % f(number=43))
test_cleanup()