◐ Shell
reader mode source ↗
Skip to content

bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (alt).#5222

Merged
methane merged 2 commits into
python:masterfrom
serhiy-storchaka:getattr-without-error-alt
Jan 25, 2018
Merged

bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (alt).#5222
methane merged 2 commits into
python:masterfrom
serhiy-storchaka:getattr-without-error-alt

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jan 17, 2018

Copy link
Copy Markdown
Member

Add _PyObject_LookupAttr() and _PyObject_LookupAttrId() and use them in appropriate cases instead of PyObject_GetAttr(), _PyObject_GetAttrId() and _PyObject_GetAttrIdWithoutError().

https://bugs.python.org/issue32571

…ode.

Added _PyObject_GetAttrIdWithoutError() and used in appropriate cases.
@methane

methane commented Jan 24, 2018

Copy link
Copy Markdown
Member

@serhiy-storchaka Would you merge this?
I want to use this API in #5273.

@1st1

1st1 commented Jan 24, 2018

Copy link
Copy Markdown
Member

I guess we can merge this ourselves if Serhiy isn't around. I'd like us to have this in 3.7.

@methane methane merged commit f320be7 into python:master Jan 25, 2018
@serhiy-storchaka serhiy-storchaka deleted the getattr-without-error-alt branch September 22, 2018 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance or resource usage skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants