[issue40451] Unexpected sys.getrefcount(foo) output

2020-04-30 Thread Cristian Martinez de Morentin
Cristian Martinez de Morentin added the comment: OK, understood. Thank you for your support! -- ___ Python tracker ___ ___

[issue40451] Unexpected sys.getrefcount(foo) output

2020-04-30 Thread Tim Peters
Tim Peters added the comment: "The 'aux' object" is simply the integer 1. The dict is irrelevant to the outcome, except that the dict owns one reference to 1. Do sys.getrefcount(1) all by itself and you'll see much the same. This isn't a bug, but neither is it a feature: it's

[issue40451] Unexpected sys.getrefcount(foo) output

2020-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: aux is equal to 1. You're seeing the refcount of the number 1. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue40451] Unexpected sys.getrefcount(foo) output

2020-04-30 Thread Cristian Martinez de Morentin
New submission from Cristian Martinez de Morentin : Hello, I have observed a strange behaviour regarding reference counting in Python 3.8.2 (Windows 64 bits). Perhaps, it could be linked to a memory leakage issue. In the following code, I would not expect an output of '137' for the reference