Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ---------- file_1.py ---------------
- print("A")
- import file_2
- print("B")
- @file_2.decorator_1
- @file_2.decorator_2
- def some():
- try:
- return "C"
- finally:
- return "D"
- print(some())
- def other():
- import file_2
- print("E") and print("F")
- @file_2.decorator_1
- class X:
- print("G")
- other()
- print("H")
- # ------ file_2.py ---------------
- print("I")
- def decorator_1(func):
- print("J")
- def wrapper():
- print("K")
- res = func()
- print("L")
- return res
- return wrapper
- def decorator_2(func):
- print("M")
- def wrapper():
- print("N")
- res = func()
- print("O")
- return res
- return wrapper
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement