Serhiy Storchaka added the comment: Thanks Eric.
A comment in PyODict_SetItem suggests to revert setting the value on the dict if adding new node failed. Following patch implements this suggestion. After committing the patch in issue25462 PyDict_DelItem can be replaced with _PyDict_DelItem_KnownHash and it will be always successful. ---------- stage: commit review -> patch review Added file: http://bugs.python.org/file40839/odict_revert_setting_on_error.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25410> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com