def good_classmethod_decorator(decorator):
    """This decorator makes class method decorators behave well wrt
    to decorated class method names, doc, etc.""" 
    def new_decorator(cls, f):
        g = decorator(cls, f)
        g.__name__ = f.__name__
        g.__doc__ = f.__doc__
        g.__dict__.update(f.__dict__)
        return g
        
    new_decorator.__name__ = decorator.__name__
    new_decorator.__doc__ = decorator.__doc__
    new_decorator.__dict__.update(decorator.__dict__)

    return new_decorator
def good_classmethod_decorator ( decorator ) : def new_decorator ( cls , f ) : g = decorator ( cls , f ) g . __name__ = f . __name__ g . __doc__ = f . __doc__ g . __dict__ . update ( f . __dict__ ) return g new_decorator . __name__ = decorator . __name__ new_decorator . __doc__ = decorator . __doc__ new_decorator . __dict__ . update ( decorator . __dict__ ) return new_decorator
This decorator makes class method decorators behave well wrt
    to decorated class method names, doc, etc.