[Biopython-dev] SeqRecord comparison suggestion

Brian Lin bylin at ucsc.edu
Tue Feb 4 17:44:47 UTC 2014


Hi everyone,

In the past I have spent hours debugging my code because I expected
different SeqRecord objects to evaluate as equal if all their attributes
(id, seq, etc) were the same. Unfortunately the "==" operator only compares
the address in memory.

Is there a reason (e.g. some tradeoff, design elements, etc) that this
behavior is tolerated? If not, I'd like to submit a pull request - I
overloaded the __eq__ and __ne__ operators and wrote a quick test for it,
then pushed it to:

https://github.com/bylin/biopython

Best,
Brian

Brian Lin | bylin at ucsc.edu | Brian's
LinkedIn<http://www.linkedin.com/in/brianylin>
B.S., Genetics and Computer Science, University of California at Davis
Ph.D Program in Bioinformatics, University of California at Santa Cruz



More information about the Biopython-dev mailing list