Tim Peters <t...@python.org> added the comment:
I don't see real value in the docs noting that Bad Things can happen if code lies about true refcounts. If a container points to an object, _of course_ the container should own that reference. Cheating on that isn't intended to be supported in any way, so there's no obligation to explain how or why things can go wrong otherwise. Worse, trying to explain such things would constrain implementations to have the same specific kinds of failure modes forever after. Neither would there would be real value in repeating "DON'T LIE ABOUT REFCOUNTS!" on every page, either ;-) If someone just wants to know more about CPython's cyclic collector, that's fine, but that takes a great many more words than are suitable in the C API docs. Luckily, Pablo recently did that: https://devguide.python.org/garbage_collector/ ---------- nosy: +tim.peters _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41133> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com