Reference counting

Rolf Wester wester at ilt.fhg.de
Fri Aug 30 09:20:36 CEST 2002


Terry Reedy wrote:

> from python:
> >>> import sys
> >>> a = 3
> >>> sys.getrefcount(a)
> 10
>

Thank you for your reply.
Can you tell me why getrefcount(a) returns 10? I would have expected to get 1.

Rolf




More information about the Python-list mailing list