[Biopython-dev] Bio.File

Michiel de Hoon mjldehoon at yahoo.com
Wed Oct 19 02:46:33 UTC 2011


I agree that it doesn't make sense to have a separate module for this. 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.

Best,
--Michiel.


--- On Mon, 10/17/11, João Rodrigues <anaryin at gmail.com> wrote:
I think it doesn't make sense to keep the module for 5 lines of code. 
    if isinstance(handleish, basestring):

        with open(handleish, mode) as fp:            yield fp

    else:        yield handleish


I'd either place them in __init__.py or just insert them in all Bio.*IO modules wherever needed. If we had more snippets in common with all *IOs, it would be valuable and understandable to have a separate module, but as is it's a bit unnecessary IMHO.





More information about the Biopython-dev mailing list