Message410812
| Author |
vstinner |
| Recipients |
Mark.Shannon, eric.snow, erlendaasland, vstinner |
| Date |
2022年01月17日.17:31:23 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1642440683.94.0.422015474021.issue45691@roundup.psfhosted.org> |
| In-reply-to |
| 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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2022年01月17日 17:31:24 | vstinner | set | recipients:
+ vstinner, Mark.Shannon, eric.snow, erlendaasland |
| 2022年01月17日 17:31:23 | vstinner | set | messageid: <1642440683.94.0.422015474021.issue45691@roundup.psfhosted.org> |
| 2022年01月17日 17:31:23 | vstinner | link | issue45691 messages |
| 2022年01月17日 17:31:23 | vstinner | create |
|