[issue36521] Consider removing docstrings from co_consts in code objects

Inada Naoki report at bugs.python.org
Sun Aug 29 23:29:18 EDT 2021


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

> I think that would require a change in the signature of PyFunction_New.

I don't think so. For example, func_annotation don't require changing PyFunction_New().

```
        case TARGET(MAKE_FUNCTION): {
            PyObject *codeobj = POP();
            PyFunctionObject *func = (PyFunctionObject *)
                PyFunction_New(codeobj, GLOBALS());
(snip)
            if (oparg & 0x04) {
                assert(PyTuple_CheckExact(TOP()));
                func->func_annotations = POP();
            }
```

----------

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


More information about the Python-bugs-list mailing list