27 Apr
2019
27 Apr
'19
12:27 p.m.
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.