Skip to content

Functions should not suppress unrelated exceptions #442

@steve-s

Description

@steve-s

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions