[Python-Dev] Lazily GC tracking tuples

Tim Peters tim_one@email.msn.com
Wed, 8 May 2002 01:20:13 -0400


[martin@v.loewis.de]
> But that brings us back to determining whether an object is "safe to
> untrack". Are you suggesting that update_refs should know what tuples
> are?

To start with, sure, and maybe to end with.  Tuples are the only type where
we have actual evidence that it can make a lick of difference.  I don't want
to delay getting an instant win there.  If somebody cares enough to invent a
Thoroughly General Protocol, and can convince Guido it's not just YAGNI,
fine.  The 6 lines of tuple-checking code can be reworked easily to use the
protocol when it exists.  Believe me <wink>:  we already spent more time
typing about this than it would have taken to write the tuple code ten times
over, and tuples are still the only specific type anyone has mentioned as
being a potential winner for this trick.