formations/python2/formation/snippets/decorateur.py

11 lines
132 B
Python

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