updated from Atlas
This commit is contained in:
16
07-closure-deco/registration_abridged.py
Normal file
16
07-closure-deco/registration_abridged.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# BEGIN REGISTRATION_ABRIDGED
|
||||
registry = []
|
||||
|
||||
def register(func):
|
||||
print('running register(%s)' % func)
|
||||
registry.append(func)
|
||||
return func
|
||||
|
||||
@register
|
||||
def f1():
|
||||
print('running f1()')
|
||||
|
||||
print('running main()')
|
||||
print('registry ->', registry)
|
||||
f1()
|
||||
# END REGISTRATION_ABRIDGED
|
||||
Reference in New Issue
Block a user