[BioPython] suggestions for Bio.PDB

thamelry at binf.ku.dk thamelry at binf.ku.dk
Sun Apr 17 14:03:23 EDT 2005


Andrew wrote:

> You should use
>    isinstance(file, basestring)
>
> for two reasons.  As of a few Python releases ago, Python
> allows unicode filenames but your check doesn't because
>
>  >>> import types
>  >>> type("") == types.StringType
> True
>  >>> type(u"") == types.StringType
> False

Thanks for pointing this out.
I've updated it in CVS.

Cheers,

-Thomas



More information about the BioPython mailing list