Message85888
Here's another patch which addsd iter to dbm and gdbm.
Note that dbm and gdbm C API is a little different.
gdbm_nextkey requires key for its argument, dbm_nextkey don't.
So I had to use for gdbm an static variable that points to the current
position.
Now iterator in gdbm and dbm works differently.
>>> import dbm
>>> d = dbm.open('foo', 'n')
>>> d['k1'] = 'v1';d['k2'] = 'v2';
>>> for i in d: print i; break
...
k1
>>> for i in d: print i
...
k2
>>> for i in d: print i
...
>>> import gdbm
>>> gd = gdbm.open('foo.gdbm', 'n')
>>> gd['k1'] = 'v1';gd['k2'] = 'v2';
>>> for i in gd: print i; break
...
k2
>>> for i in gd: print i
for i in gd: print i
...
k1
>>> for i in gd: print i
...
k2
k1 |
|
Date |
User |
Action |
Args |
2009-04-12 09:47:39 | akitada | set | recipients:
+ akitada, loewis |
2009-04-12 09:47:39 | akitada | set | messageid: <1239529659.3.0.960618338891.issue5736@psf.upfronthosting.co.za> |
2009-04-12 09:47:38 | akitada | link | issue5736 messages |
2009-04-12 09:47:38 | akitada | create | |
|