def decorator(function): def _wrapper(*args, **kwargs): ... return # Renaming the function name: _wrapper.__name__ = function.__name__ return _wrapper