shelve

Stephen Coursen coursesm at sbdhcp-4024.statenisland-ny.est.tcg.com
Tue Dec 21 11:50:59 EST 1999


On Tue, 21 Dec 1999 10:59:39 -0600 (CST), Skip Montanaro <skip at mojam.com>
wrote:
>
>    Gerrit> Skip Montanaro wrote:
>    >> for k in db.keys():
>    >>    print db[k]
>
>    Gerrit> What about:
>    Gerrit> for k in db.values():
>    Gerrit>     print k
>
>Well, yeah, but shelves can get big.  Grabbing the list of keys is likely to
>be a heck of a lot smaller than smushing the entire db file into a list.
>
There's that combined with the fact that shelves don't seem to support the
values( ) method.  At least not on my install (1.5.2 on linux2).

Steve

>Skip Montanaro | http://www.mojam.com/
>skip at mojam.com | http://www.musi-cal.com/
>847-971-7098   | Python: Programming the way Guido indented...
>



More information about the Python-list mailing list