maybe just assign directly, e.g ``func.__name__ = ....; func.__doc__ = ....``