4

How can I defined a subclass class with the Python C API whose superclass is from a pure Python module?

Python's documentation mentions that you can define a PyTypeObject that inherits from other PyTypeObject but doesn't mention anything about working with pure python classes.

This answer shows a way to define a python class from the C API, but it uses PyInstanceMethod_New which isn't available when PY_LIMITED_API is defined.

Ryan Burn
  • 2,126
  • 1
  • 14
  • 35

0 Answers0