In the previous chapter, we took a look at the PyType_Type structure and used the PyList_Type structure for lists as an example. In this chapter, I’ll demonstrate a similar approach to create our own built-in type named PyKitty_Type and even make it perform backflips!

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Defining a Custom Built-in Type

  • Chien-Lung Kao

摘要

In the previous chapter, we took a look at the PyType_Type structure and used the PyList_Type structure for lists as an example. In this chapter, I’ll demonstrate a similar approach to create our own built-in type named PyKitty_Type and even make it perform backflips!