formations/python/formation/snippets/decorateur.py

11 lines
132 B
Python
Raw Permalink Normal View History

2013-01-08 11:15:45 +01:00
def helloworld(ob):
print "Hello world"
return ob
@helloworld
def myfunc():
print "my function"
myfunc()
print myfunc