Dominic Davis-Foster <domi...@davis-foster.co.uk> added the comment:
To me your examples seem like a misuse of functools.wraps. IIUC its purpose is to make a wrapper that accepts solely *args and **kwargs appear to be the wrapped function; it doesn't seem to be intended to be used when the wrapper takes arguments of different types or that have different default values. I can't think of a situation where you'd use wraps with a decorator that doesn't take just *args and **kwargs. That's not to say there aren't occasions where you'd want to to that, just that wraps isn't the right tool. ---------- nosy: +domdfcoding _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41232> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com