deepaugment/lib/decorators.py
def counter(func):
        """Decorator counts and logs number of times the function it decorates has been called.
        """

        @wraps(func)
        def wrapper(*args, **kwargs):
            wrapper.count = wrapper.count + 1
            result = func(*args, **kwargs)
            print("{}() call counter:  {}".format(func.__name__, wrapper.count))
            return result

        wrapper.count = 0
        return wrapper
Decorator counts and logs number of times the function it decorates has been called.
        
Decorator counts and logs number of times the function it decorates has been called.
Decorator counts and logs number of times the function it decorates has been called .
def counter(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            wrapper.count = wrapper.count + 1
            result = func(*args, **kwargs)
            print("{}() call counter:  {}".format(func.__name__, wrapper.count))
            return result
        wrapper.count = 0
        return wrapper
def counter ( func ) : @ wraps ( func ) def wrapper ( * args , ** kwargs ) : wrapper . count = wrapper . count + 1 result = func ( * args , ** kwargs ) print ( "{}() call counter:  {}" . format ( func . __name__ , wrapper . count ) ) return result wrapper . count = 0 return wrapper
Decorator counts and logs number of times the function it decorates has been called.
Decorator counts and logs number of times the function it decorates has been called .
"""Decorator counts and logs number of times the function it decorates has been called.
        """
func