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.

Author methane
Recipients methane
Date 2021-08-31.03:41:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630381316.63.0.607874885673.issue45056@roundup.psfhosted.org>
In-reply-to
Content
Python 3.10 compiler adds None to co_consts even when None is not used at all.

```
$ cat x1.py
def foo():
    "docstring"
    return 42

import dis
dis.dis(foo)
print(foo.__code__.co_consts)

$ python3.9 x1.py
  3           0 LOAD_CONST               1 (42)
              2 RETURN_VALUE
('docstring', 42)

$ python3.10 x1.py
  3           0 LOAD_CONST               1 (42)
              2 RETURN_VALUE
('docstring', 42, None)
```
History
Date User Action Args
2021-08-31 03:41:56methanesetrecipients: + methane
2021-08-31 03:41:56methanesetmessageid: <1630381316.63.0.607874885673.issue45056@roundup.psfhosted.org>
2021-08-31 03:41:56methanelinkissue45056 messages
2021-08-31 03:41:56methanecreate