Skip to content

Instantly share code, notes, and snippets.

Created Nov 23, 2015
What would you like to do?
decorator でラップされた対象を控えておく
>>> lst = []
>>> def deco(f):
... lst.append(f)
>>> @deco
... def main():
... pass
>>> print(['{f.__module__}.{f.__name__}'.format(f=f) for f in lst])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment