[Python-Dev] disappearing exceptions (original) (raw)

Benjamin Peterson musiccomposition at gmail.com
Wed May 21 01:47:39 CEST 2008


On Tue, May 20, 2008 at 6:44 PM, Christian Heimes <lists at cheimes.de> wrote:

Benjamin Peterson schrieb:

Speaking of the C-API, I was thinking of introducing a new function called PyObjectSafeHasAttr that functions just like PyObjectHasAttr except it can fail. How do you define "fail" in this context?

If PyObject_GetAttr raises an exception that is not an AttributeError, it can return -1 to fail.

-- Cheers, Benjamin Peterson "There's no place like 127.0.0.1."



More information about the Python-Dev mailing list