[issue36974] Implement PEP 590

Petr Viktorin report at bugs.python.org
Fri May 31 10:08:06 EDT 2019


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

I found an issue in PEP 590:

When inheriting a heap subclass from a vectorcall class that sets .tp_call=PyVectorcall_Call (as recommended), the subclass does not inherit _Py_TPFLAGS_HAVE_VECTORCALL, and thus PyVectorcall_Call does not work for it.
Possible solutions come to mind:
- Inherit tp_vectorcall_offset more normally but handle setting __call__ specially
- Inherit tp_vectorcall_offset (but not _Py_TPFLAGS_HAVE_VECTORCALL) more normally, and make PyVectorcall_Call ignore _Py_TPFLAGS_HAVE_VECTORCALL

I'll send a PR for the latter.

----------

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


More information about the Python-bugs-list mailing list