formations/python/formation/snippets/decorateur.py
2013-01-08 11:15:45 +01:00

11 lines
132 B
Python

def helloworld(ob):
print "Hello world"
return ob
@helloworld
def myfunc():
print "my function"
myfunc()
print myfunc