[issue36521] Consider removing docstrings from co_consts in code objects

Serhiy Storchaka report at bugs.python.org
Sun Aug 29 01:52:47 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

If we are going to move docstring out of co_consts, I would make it a code object attribute rather than argument of MAKE_FUNCTION. It saves time on function creation.

Most functions do not change docstring after creation. It is the same as code docstring, so it consumes zero memory.

----------

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


More information about the Python-bugs-list mailing list