On Tue, May 31, 2011 at 10:34 AM, Chris Kaynor <ckay...@zindagigames.com> wrote: > Is there any reason not to simplify this to: > def copy_args(f): > @functools.wraps(f) > def wrapper(*args, **kw): > nargs = copy.deepcopy(args) > nkw = copy.deepcopy(kw) > return f(*nargs, **nkw) > return wrapper
No reason, good call. > It means you will copy the keys as well, however they will (almost) > certainly be strings which is effectively a no-op. I think the keys will certainly be strings. Is there any scenario where they might not be? -- http://mail.python.org/mailman/listinfo/python-list