[issue42085] Add dedicated slot for sending values

Petr Viktorin report at bugs.python.org
Tue Jul 20 10:09:33 EDT 2021


Petr Viktorin <encukou at gmail.com> added the comment:

Py_TPFLAGS_HAVE_AM_SEND is unnecessary and I'd like to remove it.

It is not possible for type objects to have a different layout than the interpreter:
- extensions using the regular ABI must be recompiled for each feature version of Python
- extensions using the stable ABI can only create types dynamically

Or is there a different reason for Py_TPFLAGS_HAVE_AM_SEND? Checking it may be faster than ((Py_TYPE(x)->tp_as_async != NULL) && (Py_TYPE(x)->tp_as_async->am_send != NULL)), but I don't think the speedup is relevant.

See bpo-42747

----------
nosy: +petr.viktorin

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


More information about the Python-bugs-list mailing list