Jun 11, 2012

Naming conventions in decorators

def decorator_name(whatevs):
    def decorator(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            pass # sweet decorator goodness
        return wrapper
    return decorator
http://stackoverflow.com/questions/10957409/python-naming-conventions-in-decorators

No comments: