[Biopython-dev] [Bug 2437] comparing alphabet references causes assert to fail when it should pass

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Jan 28 19:34:12 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2437





------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk  2008-01-28 14:34 EST -------
This code snippet shows the same issue:

from Bio.Alphabet.IUPAC import IUPACAmbiguousDNA

alpha1 = IUPACAmbiguousDNA()
alpha2 = IUPACAmbiguousDNA()

assert type(alpha1) == type(alpha2)
assert dir(alpha1) == dir(alpha2)
assert alpha1.letters == alpha2.letters

assert alpha1 == alpha2 #fails, different instances of same class

We could update the Alphabet class to define an equality check, and/or modify
Bio.Translate to use a less harsh assertion.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list