Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Aug 23, 2023

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

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

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
Copy link
MemberAuthor

@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?

@vstinnervstinner merged commit 4dc9f48 into python:mainAug 23, 2023
@vstinnervstinner deleted the dict_getref2 branch August 23, 2023 20:59
@serhiy-storchaka
Copy link
Member

@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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@serhiy-storchaka@bedevere-bot