Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def meu_decorador(f):
def funcao(*args):
print 'vem antes'
f(*args)
print 'vem depois'
return funcao
@meu_decorador
def teste(*args):
print args
teste(1,2,3)
"""
resposta:
vem antes
(1, 2, 3)
vem depois
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.