You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bsddb iterkeys sliently fails when database modified during iteration #46921
>>> db = bsddb.btopen("/tmp/n")
>>> for i inrange(5):
db[str(i)] = None
>>> db
{'1': '', '0': '', '3': '', '2': '', '4': ''}
>>> for k in db.iterkeys():
print k
del db[k]
0
>>>
The Python "dict" object raises a RuntimeError when modifying the
dictionary during iteration, the database should do the same.
Activity
tebeka commentedon Apr 22, 2008
The Python "dict" object raises a RuntimeError when modifying the
dictionary during iteration, the database should do the same.
gpshead commentedon May 25, 2008
Fixed in trunk r63617.
Fix bpo-2669: bsddb simple/legacy interface iteration silently fails
when database changes size during iteration.
It now behaves like a dictionary, the next attempt to get a value from
the iterator after the database has changed size will raise a RuntimeError.