Commits

Lukas Diekmann committed c854a2e

fixed test in lib-python/modified-2.7/test_weakref and adjusted cpython-differences documentation

Comments (0)

Files changed (2)

lib-python/modified-2.7/test/test_weakref.py

             self.assertTrue(v is value2)
         k, v = weakdict.popitem()
         self.assertTrue(len(weakdict) == 0)
-        if k is key1:
+        if k == key1:
             self.assertTrue(v is value1)
         else:
             self.assertTrue(v is value2)

pypy/doc/cpython_differences.rst

   never a dictionary as it sometimes is in CPython. Assigning to
   ``__builtins__`` has no effect.
 
+* object identity of immutable keys in dictionaries is not necessarily preserved.
+  Never compare immutable objects with ``is``.
+
 .. include:: _ref.txt
-