This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients corona10, pablogsal, serhiy.storchaka, shihai1991, tim.peters, vstinner
Date 2020-04-07.17:35:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>>> Since tp_visit is GC specific thing, I think it wold be more convenient make a special case for object types.

I don't think that follows: The gc defers the logic of what and what should not be visited to the tp_traverse implementation of every object. The GC must be agnostic of the types it receives and heap types here are not special.


Also, if we make an exception in the GC for this special case, all tp_traverse of all those functions will be incorrect. Someone reading those tp_traverse can say "Oh, why these functions do not visit the type if they own s reference to it, this looks incorrect" and then we need to explain that that is an exception in the GC just because we were lazy to implement them correctly.
Date User Action Args
2020-04-07 17:35:41pablogsalsetrecipients: + pablogsal, tim.peters, vstinner, serhiy.storchaka, corona10, shihai1991
2020-04-07 17:35:41pablogsalsetmessageid: <>
2020-04-07 17:35:41pablogsallinkissue40217 messages
2020-04-07 17:35:41pablogsalcreate