Christopher Lee <l...@chem.ucla.edu> added the comment:

I suspect that for most users, shelve is the main way they will access
the dbm.* interfaces.  Based on that, the dict methods that are really
needed on dbm.* objects are just: __iter__, __len__, __getitem__,
__setitem__, __delitem__, __contains__, has_key, and keys.  

Note: Issue 5736 aims to make dbm.* support the iterator protocol, which
would be crucial for making shelve iteration scalable (currently,
iterating on a Shelf will call self.dict.keys(), loading the entire
index into memory!).

The dbm.* docs could also explicitly tell users who want a *complete*
dict interface to create a class that inherits from both dbm and
UserDict.DictMixin / MutableMapping.

----------
nosy: +foobaron

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6045>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to