[Biopython-dev] Rethinking Seq objects

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Fri Apr 29 01:20:08 EDT 2005

Michael Hoffman wrote:
> On Thu, 28 Apr 2005, Frédéric Sohm wrote:
>> 1) get rid of MutableSeq and make all Seq mutable.
>> Will it not be a problem for some people there? I mean I only use 
>> MutableSeq so
>> noproblem there for me but I assume that someone uses non-mutable Seq 
>> or is it a
>> feature which is not needed?
> In the rest of CPython, immutable have two benefits: they are more
> memory-efficient (and sometimes space-efficient), and they are
> hashable. I don't think Seqs are usefully hashable right now, and
> Michiel says he will code the new Seq such that there won't be a
> significant performance impact.

Would you be willing to test the performance of a new Seq class? I haven't 
actually written any code yet, but I could send it to you when it's done before 
including it in Biopython. Note also that a mutable Seq class avoids the need 
for calls to tomutable and toseq, so there may be an overall performance gain. 
But it would be better to test this on a real-life case.


Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639

More information about the Biopython-dev mailing list