Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3832

Update the CPython PyObject_HasAttrString docs to mention PyObject_HasAttr is faster

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      Update the CPython PyObject_HasAttrString C API docs to mention that PyObject_HasAttr is a faster alternative if the same attribute name is going to be used multiple times.

      We can model this after https://docs.python.org/3/c-api/call.html#c.PyObject_CallFunction which has the following note:

      Note that if you only pass PyObject* args, PyObject_CallMethodObjArgs() is a faster alternative.

            Assignee:
            Unassigned Unassigned
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: