Message400683
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)
``` |
|
Date |
User |
Action |
Args |
2021-08-31 03:41:56 | methane | set | recipients:
+ methane |
2021-08-31 03:41:56 | methane | set | messageid: <1630381316.63.0.607874885673.issue45056@roundup.psfhosted.org> |
2021-08-31 03:41:56 | methane | link | issue45056 messages |
2021-08-31 03:41:56 | methane | create | |
|