echuraev opened a new pull request, #17190:
URL: https://github.com/apache/tvm/pull/17190
In case of cython when we create a set function for property then the
following code will be generated:
```
static int __pyx_setprop_4test_9TestClass_handle(PyObject *o, PyObject *v,
CYTHON_UNUSED void *x) {
if (v) {
return __pyx_pw_4test_9TestClass_6handle_3__set__(o, v);
}
else {
PyErr_SetString(PyExc_NotImplementedError, "__del__");
return -1;
}
}
```
And when we call operator `del` for this handler, then the memory will be
released and operator `__set__` will be called for NULL object. In this case an
exception that operator `__del__` is not implemented will be generated. To
avoid this problem we need to declare `__del__` function for each property
where we define operator `__set__`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]