Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6744 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2011-05-31 11:10 -0600 |
| Last post | 2011-05-31 11:10 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: scope of function parameters (take two) Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-31 11:10 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2011-05-31 11:10 -0600 |
| Subject | Re: scope of function parameters (take two) |
| Message-ID | <mailman.2324.1306861890.9059.python-list@python.org> |
On Tue, May 31, 2011 at 10:34 AM, Chris Kaynor <ckaynor@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?
Back to top | Article view | comp.lang.python
csiph-web