[Python-Dev] PEP 580/590 discussion
Jeroen Demeyer
J.Demeyer at UGent.be
Sat Apr 27 08:27:53 EDT 2019
On 2019-04-27 14:07, Mark Shannon wrote:
> class D(C):
> __call__(self, ...):
> ...
>
> and then create an instance `d = D()` then calling d will have two
> contradictory behaviours; the one installed by C in the function pointer
> and the one specified by D.__call__
It's true that the function pointer in D will be wrong but it's also
irrelevant since the function pointer won't be used: class D won't have
the flag Py_TPFLAGS_HAVE_CCALL/Py_TPFLAGS_HAVE_VECTORCALL set.
More information about the Python-Dev
mailing list