[Python-bugs-list] [ python-Feature Requests-533281 ] bsddb module needs iterators

noreply@sourceforge.net noreply@sourceforge.net
Thu, 21 Mar 2002 12:17:18 -0800


Feature Requests item #533281, was opened at 2002-03-21 15:17
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=533281&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
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():



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=533281&group_id=5470