What is dict?

Gregory (Grisha) Trubetskoy grisha at ispol.com
Mon Aug 12 18:06:33 EDT 2002


In the Library Reference, dict is described as a built-in function which
returns a dictionary object. type(dict) reports it as <type 'type'>, which
it is, of course, being a short-hand for types.DictType or
types.DictionaryType.

My question is concerned with the documentation: I wrote a type (in C)
that is a totally "new" (as opposed to "classic")  object and can be
subclassed, and documenting it as a built-in function like dict() just
doesn't feel right.

What is consensus within the Python community? Is calling dict a function
a case of a misnomer?

Grisha




More information about the Python-list mailing list