[pypy-svn] r28273 - pypy/dist/pypy/objspace/std

ale at codespeak.net ale at codespeak.net
Sun Jun 4 17:20:51 CEST 2006


Author: ale
Date: Sun Jun  4 17:20:50 2006
New Revision: 28273

Modified:
   pypy/dist/pypy/objspace/std/setobject.py
Log:
__reduce__ should return the __dict__ as well

Modified: pypy/dist/pypy/objspace/std/setobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/setobject.py	(original)
+++ pypy/dist/pypy/objspace/std/setobject.py	Sun Jun  4 17:20:50 2006
@@ -559,7 +559,8 @@
         return '%s(%s)' % (s.__class__.__name__, [x for x in s])
 
     def reduce__Set(s):
-        return (s.__class__,(tuple(s),),None)
+        dict = getattr(s,'__dict__', None)
+        return (s.__class__, (tuple(s),), dict)
 
 """, filename=__file__)
 



More information about the Pypy-commit mailing list