What is dict?

Martin v. Loewis martin at v.loewis.de
Tue Aug 13 01:20:21 CEST 2002


"Gregory (Grisha) Trubetskoy" <grisha at ispol.com> writes:

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

dict used to be a function, so that is still left over from Python 2.1
and earlier. I believe there is already a bug report requesting the
documentation to be corrected - apparently, nobody found it important
enough so far to actually write a patch to the documentation.

I disagree with Steve here: the documentation should be
accurate. Listing them under "builtin functions" should be still ok,
if that sections starts with an explanation that some of these are
actually type objects, and if each individual one gets a \versionadded
comment that states that this is a type in Python 2.2 and later.

Notice that help is in a category of its own, being an instance
(actually, it is in a category with credits and copyright).

Regards,
Martin



More information about the Python-list mailing list