Last active
March 25, 2016 13:42
-
-
Save pahaz/1647fb566be48a0d5be1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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