[Python-bugs-list] [ python-Feature Requests-662923 ] iterator for
dbm keys
SourceForge.net
noreply at sourceforge.net
Fri Sep 12 00:36:03 EDT 2003
Feature Requests item #662923, was opened at 2003-01-05 21:34
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=662923&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: paul rubin (phr)
Assigned to: Nobody/Anonymous (nobody)
Summary: iterator for dbm keys
Initial Comment:
if d is a dbm (gdbm, bsddb, shelve, etc.) object, then
"for k in d"
should iterate through the keys of d, like you can do
with dicts. Alternatively, add a new operation,
d.xkeys(), which returns an iterator that steps through
all the keys in d. d.keys() is often inappropriate
since dbm databases can be extremely large and d.keys()
tries to read all the keys into memory at once.
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-09-12 01:36
Message:
Logged In: YES
user_id=80475
bsddb and dbhash were missed for Py2.3.
Adding the to Py2.4.
See:
Lib/bsddb/__init__.py 1.6
Lib/test/test_bsddb.py 1.13
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2003-05-12 13:08
Message:
Logged In: YES
user_id=80475
I think this was taken case of for Python 2.3. Please
check to see if all of your needs have been met. If so,
please close the request. If not, paste a patch (applying
UserDict.DictMixin) for anything that was missed.
----------------------------------------------------------------------
Comment By: paul rubin (phr)
Date: 2003-02-08 05:27
Message:
Logged In: YES
user_id=72053
That's nice about shelve, but really, all the dbm classes
need this operation.
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2003-01-10 04:47
Message:
Logged In: YES
user_id=80475
* for Py2.3, all shelve now inherits from UserDict.DictMixin
which adds in the missing methods for a dictionary style
interface.
* the appropriate name for d.xkeys() is d.iterkeys().
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=662923&group_id=5470
More information about the Python-bugs-list
mailing list