[issue5937] Problems with dbm documentation

2009-05-17 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Superseded by #6045.

--
resolution:  - duplicate
status: open - closed
superseder:  - Fix dbm interfaces

___
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



[issue5937] Problems with dbm documentation

2009-05-05 Thread Mitchell Model

Mitchell Model m...@acm.org added the comment:

Further confusion:
dbm.dumb._Database objects DO support items(), DO NOT support
iteritems(), and DO support iterkeys()

My previous comments referred to the general dbm documentation and the
specifics of dbm.gnu. I haven't checked any of this against the Unix
ndbm implementation.

--

___
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



[issue5937] Problems with dbm documentation

2009-05-05 Thread Mitchell Model

Mitchell Model m...@acm.org added the comment:

And, checking the methods of dbm.ndbm, I find get() and setdefault() but
nothing like iterkeys() or iteritems(), just keys().

I think it might also be worth pointing out that a particular variation
of dbm may be chosen to create a database file by calling the
submodule's open function -- dbm.gdbm.open(), dbm.ndbm.open(), or
dbm.dumb.open().

--

___
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



[issue5937] Problems with dbm documentation

2009-05-04 Thread Mitchell Model

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