(new, old)
Simple substitute for functools.update_wrapper.
Simple substitute for functools.update_wrapper.
Simple substitute for functools . update_wrapper .
def _wrap(new, old):
    """Simple substitute for functools.update_wrapper."""
    for replace in ['__module__', '__name__', '__qualname__', '__doc__']:
        if hasattr(old, replace):
            setattr(new, replace, getattr(old, replace))
    new.__dict__.update(old.__dict__)
def _wrap ( new , old ) : for replace in [ '__module__' , '__name__' , '__qualname__' , '__doc__' ] : if hasattr ( old , replace ) : setattr ( new , replace , getattr ( old , replace ) ) new . __dict__ . update ( old . __dict__ )