[issue45056] compiler: Unnecessary None in co_consts

Inada Naoki report at bugs.python.org
Wed Sep 1 03:22:39 EDT 2021


Inada Naoki <songofacandy at gmail.com> added the comment:

I found anther example for unused constants.

The `readall()` function.
https://github.com/python/cpython/blob/863154c9292e70c5a8a1a3f22ef4ee42e2304281/Lib/_pyio.py#L663-L675

Python 3.9.5:
co_consts = ('Read until EOF, using multiple read() call.', None)
Python 3.10rc1:
co_consts = ('Read until EOF, using multiple read() call.', True, None)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45056>
_______________________________________


More information about the Python-bugs-list mailing list