[Python-bugs-list] [ python-Feature Requests-533281 ] bsddb module needs iterators
SourceForge.net
noreply@sourceforge.net
Sat, 28 Jun 2003 00:55:04 -0700
Feature Requests item #533281, was opened at 2002-03-21 21:17
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=533281&group_id=5470
Category: Python Library
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Michael McFarland (sidlon)
Assigned to: Nobody/Anonymous (nobody)
Summary: bsddb module needs iterators
Initial Comment:
The hash, btree and record classes should have an iterator defined.
The current first() and next() functions should make this a fairly
simple change to bsddbmmodule.c. This would allow:
dbh =
dbhash.open('mydb.db', 'r')
for key in dbh:
process(key,
dbh[key])
and eliminate the temptation to use the following,
which would be inadvisable for large databases:
for key in
dbh.keys():
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-06-28 09:55
Message:
Logged In: YES
user_id=21627
In what way is this fixed? The test program still does not
work...
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2003-06-28 09:11
Message:
Logged In: YES
user_id=80475
Fixed.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-05-09 16:26
Message:
Logged In: YES
user_id=21627
This is unlikely to happen. More likely, bsddb will be
deprecated.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=533281&group_id=5470