On 2019-01-09 22:12, Stefan Behnel wrote:
I would like to avoid adding Cython specific features that are better
served by the general finalisation mechanism of PEP-442.

That could also be used as argument against @cython.no_gc_clear but we still have that anyway.

Second, with PEP-442 you don't have much control over exactly when tp_finalize is called. With tp_dealloc you know for sure that it's called precisely when the object is actually being deallocated (as opposed to planned to be deallocated). For my application, tp_finalize would be too soon: it would put objects in an inconsistent state.

And last but not least, PEP-442 doesn't help for Python 2.


Jeroen.
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to