On 27 Sep 2014 01:08, "Antoine Pitrou" <solipsis@pitrou.net> wrote:
>
> On Sat, 27 Sep 2014 01:03:04 +0100
> Nathaniel Smith <njs@pobox.com> wrote:
> > Static type objects are still subject to the refcounting machinery in
> > most cases (try sys.getrefcount(int)),
>
> So what about it? :-)
>
> >>> sys.getrefcount(int)
> 69
> >>> x = list(range(10000))
> >>> sys.getrefcount(int)
> 69

Yes, that's why I said "most cases", not all cases :-).

My point was that being statically allocated doesn't make list a special snowflake that *needs* some sort of protection from refcounting. If heap and non-heap types were treated the same in this regard then nothing horrible would happen.

-n