Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49cc01e commit db86561Copy full SHA for db86561
1 file changed
Modules/gcmodule.c
@@ -236,14 +236,9 @@ has_finalizer(PyObject *op)
236
if (delstr == NULL)
237
Py_FatalError("PyGC: can't initialize __del__ string");
238
}
239
- if ((PyInstance_Check(op) ||
240
- PyType_HasFeature(op->ob_type, Py_TPFLAGS_HEAPTYPE)) &&
241
- PyObject_HasAttr(op, delstr)) {
242
- return 1;
243
- }
244
- else {
245
- return 0;
246
+ return (PyInstance_Check(op) ||
+ PyType_HasFeature(op->ob_type, Py_TPFLAGS_HEAPTYPE))
+ && PyObject_HasAttr(op, delstr);
247
248
249
/* Move all objects with finalizers (instances with __del__) */
0 commit comments