One can also define a ‘dictate’ decorator as follows: from functools import wraps def dictate(func): @wraps(func) def patched(*args, **kwargs): return dict(*func(*args, **kwargs)) return patched