Sales (decorator usage) 1

Run Settings
LanguagePython
Language Version
Run Command
def dec(func): amount = 0 def wrapper(sales): nonlocal amount print("before external function is called") amount +=sales func(amount) print("after external function is called:", amount) return wrapper @dec def hello(sales): print("total amount is:", sales) hello(1) hello(2)
Editor Settings
Theme
Key bindings
Full width
Lines