STINNER Victor added the comment:
Ok, I pushed my new function. Expensive checks are disabled by default: define
DEBUG_PYDICT to enable them (ex: gcc -D DEBUG_PYDICT).
Thanks for the review Eric, Naoki & Xiang!
--
resolution: -> fixed
status: open -> closed
Roundup Robot added the comment:
New changeset ee44c971b3af by Victor Stinner in branch '3.6':
Add _PyDict_CheckConsistency()
https://hg.python.org/cpython/rev/ee44c971b3af
New changeset 070cc3b9d5cc by Victor Stinner in branch 'default':
Merge 3.6
https://hg.python.org/cpython/rev/070cc3b9d5cc
STINNER Victor added the comment:
Ok, here is a more complete _PyDict_CheckConsistency() with an optional
DEBUG_PYDICT (disabled by default).
--
Added file: http://bugs.python.org/file44640/dict_check_consistency-2.patch
___
Python tracker
New submission from STINNER Victor:
Attached patch adds a function to check the consistency of a Python dictionary
after each modification.
The current implementation does really simple checks, but more advanced checks
might be added later.
I tried to check also the dictionary content, but