Create a Python type from C that implements a __dict__?

前端 未结 4 2285
日久生厌
日久生厌 2021-02-15 16:22
  • How is a type created to have a __dict__ as per a \"normal\" class would have were it defined in Python?
  • Are there any examples of non-dynamic types
4条回答
  •  自闭症患者
    2021-02-15 17:03

    How about writing some Python code defining a class and a method or two, compiling it with Cython and inspecting the generated C code?

提交回复
热议问题