New submission from Zuzu_Typ :
Using the C-API, the inplace_pow numbermethod is always called with the third
argument pointing to an invalid address.
The reason is likely that self.__ipow__ only takes one argument, resulting in a
binaryfunc (self, arg), though inplace_pow is a ternaryfunc
Zuzu_Typ added the comment:
Even though __ipow__ might be documented to take a third argument, if you build
an inplace_pow function using the C-API, you can only pass one argument to it.
You can see that in the attached screenshot.
The example class shown in the screenshot can be found here
Zuzu_Typ added the comment:
This isn't about the CPython Interpreter, it's about the C-API, the APIT for
writing c-extensions for Python.
I know it works in CPython.
--
___
Python tracker
<https://bugs.python.o
New submission from Zuzu_Typ :
It should be considered to increase the refcount of functions that are passed
on to an external library at some point.
If this is not done and e.g. the function was a local variable, when leaving
the scope it gets garbage-collected. When the library now tries to