First page Back Continue Last page Overview Graphics
notes
A decorator does something, then (usually) calls your function.
This is another Python 'equivalent code' trick:
- @trace
- def myFunc(): print “Hello”
is equivalent to:
- def myFunc(): print “Hello”
- myFunc = trace(myFunc())