[Python] Odd Reference Counts Python 3.12.6 [duplicate]

Discussão em 'Python' iniciado por Stack, Maio 17, 2025.

  1. Stack

    Stack Membro Participativo

    I was seeing how many reference counts some objects had in a fresh terminal session and was quickly surprised by the behavior I saw. It is telling me that 1, 'hello', and 55 all have a reference count of 4294967295, which happens to be the maximum value for 32-bit unsigned integer. Even more interesting, the count for 327 was only 3.

    Does anyone have any idea what could be going on here? Here's a photo of my terminal.

    I am using Python 3.12.6.

    Continue reading...

Compartilhe esta Página