April 11, 2003
5:08 a.m.
Tim Peters <tim.one@comcast.net> writes:
So I'm unclear on what we're trying to optimize when a tp_clear nukes less than the corresponding tp_traverse visits. I suppose "code space" is one decent answer to that.
In the case of type objects, it's not a matter of optimization but of correctness. If you were clearing all slots of a type object, you'd lose state that is still needed later on; see the comment for typeobject.c:2.150. Regards, Martin