This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author foobaron
Recipients akitada, foobaron, loewis, skip.montanaro
Date 2009-08-06.00:32:35
SpamBayes Score 2.0859275e-06
Marked as misclassified No
Message-id <1249518758.11.0.758069409132.issue5736@psf.upfronthosting.co.za>
In-reply-to
Content
Another reason this issue is really important, is that the lack of a
consistent iter() interface for dbm.* makes shelve iteration not
scalable; i.e. trying to iterate on a Shelf will run self.dict.keys() to
load the entire index into memory.  This seems contrary to a primary
purpose of shelve, namely to store the index on-disk so as to avoid
having to keep the whole index in memory.  

I suspect that for most users, shelve is the main way they will access
the dbm.* interfaces.  Therefore, fixing the dbm.* interfaces so that
shelve is scalable seems like an important need.

Once dbm and gdbm support the iterator protocol, it will be trivial to
add an __iter__() method to shelve.Shelf, that simply returns
iter(self.dict).
History
Date User Action Args
2009-08-06 00:32:38foobaronsetrecipients: + foobaron, loewis, skip.montanaro, akitada
2009-08-06 00:32:38foobaronsetmessageid: <1249518758.11.0.758069409132.issue5736@psf.upfronthosting.co.za>
2009-08-06 00:32:36foobaronlinkissue5736 messages
2009-08-06 00:32:35foobaroncreate