Message 410812 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
> `sys.float_info.n_unnamed_fields` causes a memory violation if the per-interpreter allocated 0 held by sys.float_info.n_unnamed_fields is freed.
> If it is not freed, then `sys.float_info.n_unnamed_fields is 0` is False, meaning that there are two zeros present.

Python 3.9 and 3.10 are concerned by this issue: integer singletons are per-interpreter since Python 3.9.

Should Python 3.9 and 3.10 be fixed? "x is 0" is recommended and should be used. For example, the compiler emits a SyntaxWarning:

$ python3.9
>>> x=0
>>> x is 0
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
True

I propose to only fix the main branch and so close the issue.