GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C API: Add PyObject_GetOptionalAttr() function · Issue #106521 · python/cpython

C API: Add PyObject_GetOptionalAttr() function #106521

New issue
Copy link
New issue
Copy link
Closed
Closed
C API: Add PyObject_GetOptionalAttr() function#106521
Copy link
Labels
topic-C-APItype-featureA feature request or enhancementA feature request or enhancement

Description

@serhiy-storchaka
serhiy-storchaka
opened on Jul 7, 2023
Issue body actions

It is a new name of former _PyObject_LookupAttr() added in #76752.

int PyObject_GetOptionalAttr(PyObject *obj, PyObject *attr_name, PyObject **result);

Discussion about making it public and naming: https://discuss.python.org/t/make-pyobject-lookupattr-public/29104.

See also other new functions with similar interface in #106307 and #106004.

Linked PRs

  • gh-106521: Add PyObject_GetOptionalAttr() function #106522
  • gh-106521: Remove _PyObject_LookupAttr() function #106642

Activity

  1. serhiy-storchaka
    added
    type-featureA feature request or enhancementA feature request or enhancement
    topic-C-API
    on Jul 7, 2023
  2. serhiy-storchaka
    added 4 commits that reference this issue on Jul 7, 2023

    pythongh-106521: Add PyObject_GetOptionalAttr() function

    cf4d3cd

    gh-106521: Add PyObject_GetOptionalAttr() function (GH-106522)

    579aa89

    pythongh-106521: Replace _PyObject_LookupAttr with PyObject_GetOption…

    ce2e6f9

    gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)

    be1b968
  3. vstinner commented on Jul 12, 2023

    @vstinner
    vstinner
    on Jul 12, 2023
    Member
    More actions

    I added PyObject_GetOptionalAttr() and PyObject_GetOptionalAttrString() to pythoncapi-compat: python/pythoncapi-compat@157d6d4

  4. carljm commented on Jul 13, 2023

    @carljm
    carljm
    on Jul 13, 2023
    Member
    More actions

    PRs are merged, this looks done.

  5. carljm
    closed this as completedon Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-C-APItype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.