Message365924
>>> 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:41 | pablogsal | set | recipients:
+ pablogsal, tim.peters, vstinner, serhiy.storchaka, corona10, shihai1991 |
2020-04-07 17:35:41 | pablogsal | set | messageid: <1586280941.83.0.314086783833.issue40217@roundup.psfhosted.org> |
2020-04-07 17:35:41 | pablogsal | link | issue40217 messages |
2020-04-07 17:35:41 | pablogsal | create | |
|