This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author MLModel
Recipients MLModel, georg.brandl
Date 2009-05-05.04:19:13
SpamBayes Score 2.1837088e-11
Marked as misclassified No
Message-id <1241497158.05.0.293072104971.issue5937@psf.upfronthosting.co.za>
In-reply-to
Content
There are some problems with the dbm documentation. In the opening section:

1.  The comment before the iteration example says that .values() works,
but the method is not defined.
2.  The statement in the paragraph after the documentation of dbm.open()
says that the opened dbm object "supports most of the same functionality
as dictionaries". It specifically mentions keys(), but should state that
values() is not supported.
3.  I disagree with the use of the word "most" there. It does support a
minimal dictionary-like interface, but it provides only about 1/3 of the
method that dict does.
4.  The documentation should point out that keys() returns a list not a
dict_keys object.
5.  The example code shows the use of iteritems() but the documentation
doesn't mention it. In any case, there is no such method.
6.  In fact, the comment at the beginning of dbm/__init__.py states that
the interface is limited to set, get, and del using [] notation, the in
operator (and though not stated, the not in operator), and k.keys().

The Unix dbm section does state that values() and items() are not
supported, but the gdbm section does not (and should).

I hope this is all accurate. In general, the whole page should be edited
to be consistent with the actual implementation.
History
Date User Action Args
2009-05-05 04:19:19MLModelsetrecipients: + MLModel, georg.brandl
2009-05-05 04:19:18MLModelsetmessageid: <1241497158.05.0.293072104971.issue5937@psf.upfronthosting.co.za>
2009-05-05 04:19:16MLModellinkissue5937 messages
2009-05-05 04:19:13MLModelcreate