Skip to content

Instantly share code, notes, and snippets.

@pahaz pahaz/less25032016.py
Last active Mar 25, 2016

Embed
What would you like to do?
def logg(func):
def logged_func(*args, **kwargs):
print(func.__name__ + '() ...',
args, kwargs)
return func(*args, **kwargs)
logged_func.__doc__ = func.__doc__
logged_func.__name__ = func.__name__
return logged_func
@logg
def print_square_sum(*args):
"""Docs"""
_sum = sum(args)
print(str(_sum ** 2) + ' ...!!', args)
@logg
def some1():
"""some1 docs"""
pass
some1()
print_square_sum(2, 1, 2)
print(some1.__doc__, some1.__name__)
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.