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

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Jul 5 07:40:20 UTC 2010


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


fkauff at biologie.uni-kl.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #4 from fkauff at biologie.uni-kl.de  2010-07-05 03:40 EST -------
It's a typo (a rather old one). 

Type checking has been changed to isinstance.

Frank

(In reply to comment #1)
> I think it's a typo. The function write_nexus_data takes an argument
> "filename", and this code block is supposed to figure out whether that's an
> open file handle or a file name.
> 
> So it should be:
> 
> if hasattr(filename, 'write'): ...
> 
> But we actually do it a different way now, checking for strings:
> 
> if isinstance(filename, basestr): # open it
> else: # it's a handle
> 


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