[Biopython-dev] Bio.File

Peter Cock p.j.a.cock at googlemail.com
Wed Oct 19 04:53:25 EDT 2011


2011/10/19 Michiel de Hoon <mjldehoon at yahoo.com>
>
> I agree that it doesn't make sense to have a separate module for this.

For just the one little function, maybe not. I suspect we may want
more "File related" things like this for Python 3, what with text vs
binary handles and so on, in which case keeping Bio/File.py is
sensible.

> Even if we put it in Bio/__init__.py, people are likely to forget about
> it, and we will end up with some modules that use this code in
> Bio/__init__.py and other modules that copy this code in their
> source code. As this code is very short, I would just copy it into
> the modules that use it.

It may be short, but duplicating this function all over the place
seems like a very bad idea. I think we should just be vigilant in
making sure it is used uniformly wherever we want to accept
either a handle or a filename. Perhaps some of the historically
handle-only parsers should start using it now?

Peter


More information about the Biopython-dev mailing list