[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-31 Thread Eric Lippert
Eric Lippert added the comment: If it were possible that the interpreter iterating over a dictionary could cause the dictionary to change size then I suspect that this would be a rich source of bugs to mine. :-) It would be great if we could make it a documented, enforced invariant that

[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-30 Thread Eric Lippert
Change by Eric Lippert : -- keywords: +patch pull_requests: +8479 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34551> ___ ___ Py

[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-30 Thread Eric Lippert
New submission from Eric Lippert : In _PyFunction_FastCallDict we have local nk assigned to be the size of a dictionary, and then local i is assigned to twice the size of the same dictionary, and then nk is assigned to half of i, which it already is: nk = (kwargs != NULL