diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-10-27 16:39:10 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-10-27 16:39:10 (GMT) |
commit | 41eb7164df4f779864cfad52e5470286ef4fcb4c (patch) | |
tree | 5e910cdadf9af80a4577d4ba5ea8b06a3ca1e572 /Lib/functools.py | |
parent | d3aad0199e5a6dc8e4907210daa89fc32bb57c94 (diff) | |
download | cpython-41eb7164df4f779864cfad52e5470286ef4fcb4c.zip cpython-41eb7164df4f779864cfad52e5470286ef4fcb4c.tar.gz cpython-41eb7164df4f779864cfad52e5470286ef4fcb4c.tar.bz2 |
[Bug #1576241] Let functools.wraps work with built-in functions
Diffstat (limited to 'Lib/functools.py')
-rw-r--r-- | Lib/functools.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/functools.py b/Lib/functools.py index 1fafb01..bb13713 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -32,7 +32,7 @@ def update_wrapper(wrapper, for attr in assigned: setattr(wrapper, attr, getattr(wrapped, attr)) for attr in updated: - getattr(wrapper, attr).update(getattr(wrapped, attr)) + getattr(wrapper, attr).update(getattr(wrapped, attr, {})) # Return the wrapper so this can be used as a decorator via partial() return wrapper |