Message276080
| Author |
xiang.zhang |
| Recipients |
mbussonn, methane, python-dev, vstinner, xiang.zhang |
| Date |
2016年09月12日.17:42:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1473702141.27.0.656061021462.issue28040@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年09月12日 17:42:21 | xiang.zhang | set | recipients:
+ xiang.zhang, vstinner, methane, python-dev, mbussonn |
| 2016年09月12日 17:42:21 | xiang.zhang | set | messageid: <1473702141.27.0.656061021462.issue28040@psf.upfronthosting.co.za> |
| 2016年09月12日 17:42:21 | xiang.zhang | link | issue28040 messages |
| 2016年09月12日 17:42:21 | xiang.zhang | create |
|