formations/python/python3/fr/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