diff Lib/contextlib.py @ 37257:034c0cf5007b legacy-trunk

Fix contextlib not copying function attributes
author Phillip J. Eby <pje@telecommunity.com>
date Tue, 28 Mar 2006 00:07:24 +0000
parents 51df994885e9
children 2cd1e5b15e05
line wrap: on
line diff
--- a/Lib/contextlib.py	Mon Mar 27 23:58:46 2006 +0000
+++ b/Lib/contextlib.py	Tue Mar 28 00:07:24 2006 +0000
@@ -78,6 +78,7 @@
     try:
         helper.__name__ = func.__name__
         helper.__doc__ = func.__doc__
+        helper.__dict__ = func.__dict__
     except:
         pass
     return helper