[Biopython-dev] Indexing (large) sequence files with Bio.SeqIO
Peter
biopython at maubp.freeserve.co.uk
Thu Aug 20 16:19:19 UTC 2009
Peter wrote:
> Michiel wrote:
>>
>> I just have two suggestions:
>>
>> Since indexed_dict returns a dictionary-like object, it may make sense
>> for the _IndexedSeqFileDict to inherit from a dict.
>
> We'd have to override things like values() to prevent explosions in memory,
> and just give a not implemented exception. But yes, good point.
Done on github - I also had to override all the writeable dict methods like
pop and clear which don't make sense here. The code for the class is now
a bit longer, but is certainly more dict-like. I also had to implement __str__
and __repr__ to do something I think is useful and sensible.
Peter
More information about the Biopython-dev
mailing list