On Wed, Mar 12, 2014 at 3:44 PM, Chris Angelico <ros...@gmail.com> wrote:
> The concept is that the GC tracks (in that sense; everything in
> CPython is refcounted, but that's not what these functions look at)
> anything that could be a part of a reference cycle. That's all it
> concerns itself with, so something that can't have references to
> arbitrary objects can't possibly be worth tracking. Interestingly, a
> tuple of integers is tracked:
>
>>>> a=1,2,3
>>>> gc.is_tracked(a)
> True
>
> 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
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to