A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024066.html below:

[Python-Dev] A couple of quick type system questions

[Python-Dev] A couple of quick type system questions [Python-Dev] A couple of quick type system questionsGuido van Rossum guido@python.org
Fri, 10 May 2002 19:53:10 -0400
> 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