Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions should not suppress unrelated exceptions #442

Open
steve-s opened this issue Jul 12, 2023 · 0 comments
Open

Functions should not suppress unrelated exceptions #442

steve-s opened this issue Jul 12, 2023 · 0 comments
Labels

Comments

@steve-s
Copy link
Contributor

steve-s commented Jul 12, 2023

I think that issue capi-workgroup/problems#51 raises (pun intended) good points about APIs such as:

  • PyDict_GetItem and PyDict_GetItemString
  • PyMapping_HasKey and PyMapping_HasKeyString
  • PyObject_HasAttr and PyObject_HasAttrString
  • PySys_GetObject

For the time being HPy only exposes PyObject_HasAttr and I think we should change its semantics to match the PyObject_HasAttrEx suggested in the issue. For older CPython versions using a hand-written implementation and for newer delegating to PyObject_HasAttrEx if it makes it upstream.

@steve-s steve-s added good first issue Good for newcomers API design labels Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant