Hi.

While reading the rich_compare of PyLongObject, I noticed this line:

https://hg.python.org/cpython/file/a49737bd6086/Objects/longobject.c#l2785

It increments the ob_ref of the builtin True/False object.

Initializing the ob_ref of True/False to one so that they won't be
garbage collected if fair enough. Why do we increment it?

I don't see the reason behind it, since these two objects should
always stay in the memory and never participate the garbage collecting
system.


Regards.

-- 

吾輩は猫である。ホームーページはhttp://introo.me。
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to