[Python-Dev] cpython: Use a known unique object for the dummy entry. (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Sat Aug 17 20:42:28 CEST 2013


On Sat, 17 Aug 2013 11:32:00 +0200 (CEST) raymond.hettinger <python-checkins at python.org> wrote:

http://hg.python.org/cpython/rev/2c9a2b588a89 changeset: 85218:2c9a2b588a89 user: Raymond Hettinger <python at rcn.com> date: Sat Aug 17 02:31:53 2013 -0700 summary: Use a known unique object for the dummy entry.

This lets us run PyObjectRichCompareBool() without first needing to check whether the entry is a dummy. files: Objects/setobject.c | 45 ++++++++++++++------------------ 1 files changed, 20 insertions(+), 25 deletions(-)

This broke test_gdb on several machines:

====================================================================== FAIL: test_sets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of sets

Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_gdb.py", line 319, in test_sets self.assertEqual(gdb_repr, "{'b'}") AssertionError: "{<object at remote 0x7ffff7eed040>, 'b'}" != "{'b'}"

Obviously the pretty-printing of sets isn't able to recognize the dummy from regular set contents, anymore :-) It should be fixable, but I don't know how.

Regards

Antoine.



More information about the Python-Dev mailing list