[Biopython-dev] [Bug 3118] New: isinstance should use basestring for detecting string type

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sat Jul 17 21:04:24 UTC 2010


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

           Summary: isinstance should use basestring for detecting string
                    type
           Product: Biopython
           Version: Not Applicable
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: claude at 2xlibre.net


I've been bitten by this issue today, when I gave a Unicode string to
annotation["date"] and the SeqIO writer for GenBank format tested it as
isinstance(..., str) which returned False (Bio/SeqIO/InsdcIO.py).

I saw that the code had a mix of isinstance( , str) and isinstance( ,
basestring). I chased all remaining str type comparisons for cooking the
following patch.


-- 
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