[Biopython-dev] Bio.File

João Rodrigues anaryin at gmail.com
Mon Oct 17 17:21:28 UTC 2011


>
> At the time I had forgotten about Michiel's suggestion
>
we deprecate Bio.File, which is unfortunate, but we
> can still change this before our next release.
>
> So, should we keep Bio.File for as_handle (even if
> everything else in Bio.File is to be deprecated), or
> should we move the new as_handle functionality
> somewhere else and deprecate all of Bio.File.
>

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.


>
> Thanks for double checking João,
>

No problem.

Cheers,

João




More information about the Biopython-dev mailing list