[pypy-svn] r72349 - pypy/trunk/pypy/lib

xoraxax at codespeak.net xoraxax at codespeak.net
Thu Mar 18 05:36:24 CET 2010


Author: xoraxax
Date: Thu Mar 18 05:36:23 2010
New Revision: 72349

Modified:
   pypy/trunk/pypy/lib/identity_dict.py
Log:
Use slots for identity_dict.

Modified: pypy/trunk/pypy/lib/identity_dict.py
==============================================================================
--- pypy/trunk/pypy/lib/identity_dict.py	(original)
+++ pypy/trunk/pypy/lib/identity_dict.py	Thu Mar 18 05:36:23 2010
@@ -7,6 +7,8 @@
 
 
 class IdentityDictPurePython(object, DictMixin):
+    __slots__ = "_dict _keys".split()
+
     def __init__(self):
         self._dict = {}
         self._keys = {} # id(obj) -> obj
@@ -30,6 +32,8 @@
 
 
 class IdentityDictPyPy(object, DictMixin):
+    __slots__ = ["_dict"]
+
     def __init__(self):
         self._dict = idict()
 



More information about the Pypy-commit mailing list