How to support annotations for a custom type in a C extension?

Serhiy Storchaka storchaka at gmail.com
Sun Sep 19 11:06:17 EDT 2021


19.09.21 05:59, MRAB пише:
> On 2021-09-18 16:09, Serhiy Storchaka wrote:
>> "(PyCFunction)" is redundant, Py_GenericAlias already has the right
>> type. Overuse of casting to PyCFunction can hide actual bugs.
>>
> I borrowed that from listobject.c, which does have the cast.

Fixed. https://github.com/python/cpython/pull/28450



More information about the Python-list mailing list