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

Thomas Heller thomas.heller@ion-tof.com
Sat, 11 May 2002 14:24:09 +0200


> > 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.
> 
Huh?

tp_dict of int (_PyInt_Type) is NULL.

Thomas