On Wed, Mar 12, 2014 at 4:35 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote: >> So not all optimizations are done that could be done. > > Or is it? > >>>> a = 1,2,3 >>>> gc.is_tracked(a) > True >>>> gc.collect() > 0 >>>> gc.is_tracked(a) > False
I guess the reason for this is that when PyTuple_New is called, it knows how many elements it will contain but doesn't know yet what they are, so it defers the issue by just going ahead and adding itself to the GC -- https://mail.python.org/mailman/listinfo/python-list