Xiang Zhang added the comment:

I'd like to reopen this one since I still don't think this change is needed and 
suggest to revert since this change make split table combined on deletion.

Deletion will not alter split dict's order. Only insertion after deletion will. 
But this case is already handled in insertdict[0]. So I think we don't have to 
combine once an item is deleted from split dict.

The example INADA gives works well with the previous implementation(before this 
change). The problem there is a SystemError I think is dict.pop() doesn't 
handle pending state (del dict does, so you can produce the same failure when 
try del dict[]). We only add `|| *value_addr == NULL` as delitem does.

poc.patch reverts the change (preserve the tests, eliminating the size compare 
part) and add pending state handling in dict.pop(). It passes. And if you 
remove the pending state handling, you can product the SystemError.

I'd like to know if my idea is totally wrong. :)

[0] https://hg.python.org/cpython/file/tip/Objects/dictobject.c#l1057

----------
status: closed -> open
Added file: http://bugs.python.org/file44596/poc.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28040>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to