[Biopython-dev] [Bug 3105] Bio.Nexus useless line

Frank Kauff fkauff at biologie.uni-kl.de
Mon Jul 5 11:07:22 UTC 2010



On 07/05/2010 12:31 PM, bugzilla-daemon at portal.open-bio.org wrote:
> http://bugzilla.open-bio.org/show_bug.cgi?id=3105
>
>
>
>
>
> ------- Comment #6 from biopython-bugzilla at maubp.freeserve.co.uk  2010-07-05 06:31 EST -------
> (In reply to comment #4)
>    
>> It's a typo (a rather old one).
>>
>> Type checking has been changed to isinstance.
>>
>> Frank
>>      
> I've just changed it back to method checking, i.e. as Eric suggested with
> my typo fixed:
>
> if hasattr(filename, 'write'):
>
> The trouble with isinstance(filename, file) is that it doesn't allow for file
> like objects - specifically a StringIO handle as used in the unit tests,
> meaning test_AlignIO.py was failing.
>
> Peter
>
>
>    
Goot catch. I didn't remember that.

Frank




More information about the Biopython-dev mailing list