◐ Shell
clean mode source ↗

gh-108308: Replace _PyDict_GetItemStringWithError() by vstinner · Pull Request #108372 · python/cpython

serhiy-storchaka

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change!

Replace _PyDict_GetItemStringWithError() calls with
PyDict_GetItemStringRef() which returns a strong reference to the
item.

Co-Authored-by: Serhiy Storchaka <storchaka@gmail.com>

@vstinner

@serhiy-storchaka: I integrated your suggested changes and made you as a co-author. I addressed your review. Would you mind to review the updated PR?

serhiy-storchaka

@serhiy-storchaka

@serhiy-storchaka: I integrated your suggested changes and made you as a co-author.

Oh, it was minor comment. I like how this API allows to write the code in multiple ways, to better fit in every particular case.