New submission from Mitchell Model <m...@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 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. ---------- assignee: georg.brandl components: Documentation messages: 87208 nosy: MLModel, georg.brandl severity: normal status: open title: Problems with dbm documentation versions: Python 3.0, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5937> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com