On 03/29/2014 01:47 PM, Nick Coghlan wrote:
On 30 March 2014 03:05, Ethan Furman wrote:
This bit of code won't even finish compiling. I am not sure if my
understanding of references (and how these functions create/consume them) or
my understanding of when and where to call PyErr_Fetch|Restore
On 30 March 2014 03:05, Ethan Furman wrote:
>
> This bit of code won't even finish compiling. I am not sure if my
> understanding of references (and how these functions create/consume them) or
> my understanding of when and where to call PyErr_Fetch|Restore or
> PyException_SetContext is at fault
I'm working on issue 1615 [1] and came up with this tidbit, which works [2],
but not well enough:
slot_tp_getattr_hook(PyObject *self, PyObject *name)
{
...
+PyObject *error_type, *error_value, *error_traceback;
...
+/* if an AttributeError is set, save it and call getattr; i