[Biopython-dev] Biopython specific warning classes

Peter Cock p.j.a.cock at googlemail.com
Wed May 18 19:42:39 UTC 2011


Hi all,

I've been thinking we should introduce some specific warning
classes to Biopython, in particular:

ParserWarning, for any "dodgy" input files, such as invalid
GenBank LOCUS lines, and so on. The existing PDB parser
warning should become a subclass of this.

WriterWarning, for things like "data loss", e.g. record IDs
getting truncated in PHYLIP output.

Perhaps even a base class BiopythonWarning, which would
be useful for people wanting to ignore all the Biopython issued
warnings - it might be helpful in our unit tests too.

Currently (apart from the PDB module), we tend to use
the default UserWarning which makes filtering the warnings
as an end user (or a unit test writer) quite hard.

Any thoughts? Or better name suggestions?

Regards,

Peter



More information about the Biopython-dev mailing list