Saturday, 16 August 2014

Function Decorators in Python

They can be used to add "attributes" to a Python function. They look like this:

@specialPowers
def myFunction():
    doStuff

Thinking in Java author Bruce Eckel has written an article on Artima on this.

No comments: