> 1. I realize that some objects have no dict. Must every /type/ have > a dict, or is it possible to have a type with only slots? ob_type has the type PyType_Object *, and a PyType_Object has a tp_dict pointer, so I think the answer is that every /type/ has a dict. > 2. Suppose I want to generate a new type object dynamically? How do > I go about choosing an appropriate allocator? You could use the one used by type_new(). --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4