difference b/t dictionary{} and anydbm - they seem the same

Robert Bossy Robert.Bossy at jouy.inra.fr
Tue Mar 11 10:10:30 EDT 2008


davidj411 wrote:
> anydbm and dictionary{} seem like they both have a single key and key
> value.
> Can't you put more information into a DBM file or link tables? I just
> don't see the benefit except for the persistent storage.
Except for the persistent storage, that insignificant feature... ;) Well 
I guess that persistent storage must be the reason some people use 
anydbm sometimes.

If you want keys and values of any type (not just strings) and 
persistent storage, you can use builtin dicts then pickle them.

Cheers,
RB




More information about the Python-list mailing list