summaryrefslogtreecommitdiffstats
path: root/Lib/contextlib.py
diff options
context:
space:
mode:
authorPhillip J. Eby <pje@telecommunity.com>2006-03-28 00:07:24 (GMT)
committerPhillip J. Eby <pje@telecommunity.com>2006-03-28 00:07:24 (GMT)
commit35fd142435a5123d3ce740d14068034dab9ee5ec (patch)
tree6c1305021901f50654997d506c8f11c1d3bfec3e /Lib/contextlib.py
parentd207b4f3767673a8cb54a20de26e4c10235fb78c (diff)
downloadcpython-35fd142435a5123d3ce740d14068034dab9ee5ec.zip
cpython-35fd142435a5123d3ce740d14068034dab9ee5ec.tar.gz
cpython-35fd142435a5123d3ce740d14068034dab9ee5ec.tar.bz2
Fix contextlib not copying function attributes
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r--Lib/contextlib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
index d329087..9c00ef0 100644
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -78,6 +78,7 @@ def contextmanager(func):
try:
helper.__name__ = func.__name__
helper.__doc__ = func.__doc__
+ helper.__dict__ = func.__dict__
except:
pass
return helper