[New-bugs-announce] [issue5937] Problems with dbm documentation
report at bugs.python.org
Tue May 5 06:19:18 CEST 2009
New submission from Mitchell Model <mlm at acm.org>:
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
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.
nosy: MLModel, georg.brandl
title: Problems with dbm documentation
versions: Python 3.0, Python 3.1
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce