This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author njs
Recipients methane, njs, serhiy.storchaka, vstinner
Date 2018-01-17.11:32:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516188751.34.0.467229070634.issue32571@psf.upfronthosting.co.za>
In-reply-to
Content
Can I ask why this is a private API? It's extremely useful for extension modules too. For example, numpy has been carrying around a reimplementation of PyObject_GetAttr for years, exactly to avoid the cost of creating an AttributeError exception in common cases:

https://github.com/numpy/numpy/blob/master/numpy/core/src/private/get_attr_string.h

(To emphasize the similarity, note that the code above used to be called PyArray_GetAttrString_SuppressException, until a refactoring last year: https://github.com/numpy/numpy/commit/69a423b23492ecf8471efc4e59ab8a93b03d8454. It's always been specifically used for looking up numpy-specific special methods like __array__, __array_interface__, etc., though, which is why it can get away with those shortcuts -- we know they usually aren't defined.)
History
Date User Action Args
2018-01-17 11:32:31njssetrecipients: + njs, vstinner, methane, serhiy.storchaka
2018-01-17 11:32:31njssetmessageid: <1516188751.34.0.467229070634.issue32571@psf.upfronthosting.co.za>
2018-01-17 11:32:31njslinkissue32571 messages
2018-01-17 11:32:31njscreate