formations/algo/poo/cours/snippets/decorateur.py

11 lines
132 B
Python
Raw Normal View History

2017-09-05 09:25:48 +02:00
def helloworld(ob):
print "Hello world"
return ob
@helloworld
def myfunc():
print "my function"
myfunc()
print myfunc