[Biopython-dev] Bio.SeqIO

Peter biopython-dev at maubp.freeserve.co.uk
Wed Mar 7 10:35:05 UTC 2007


Chris Lasher wrote:
> On 3/6/07, Peter <biopython-dev at maubp.freeserve.co.uk> wrote:
>> Only Michiel has replied, so I assume there are no other strong views on
>> the dev mailing list.
> 
> If you're still soliciting opinions, here's mine: I am really fond of
> the SeqIO.parse function, rather than SeqIO.read, since read is a
> builtin function. Different namespaces, but parse is unambiguous.

We have gone for Bio.SeqIO.parse and Bio.SeqIO.write

Is read really a built in function?  Its not on this list:

http://docs.python.org/lib/built-in-funcs.html

> For remaining function/method names, I would really prefer to stick to
> the PEP 8 style guide, which specifies:
> 
>> Function Names
>>
>>  Function names should be lowercase, with words separated by underscores
>>  as necessary to improve readability.
>>
>>  mixedCase is allowed only in contexts where that's already the
>>  prevailing style (e.g. threading.py), to retain backwards compatibility.
> 
> e.g., to_dict() instead of toDict().

Any views on to_dict versus as_dict, to_alignment versus as_alignment?

As an aside, we should really have a "coding styles" page on the wiki 
somewhere, and by default I would also reference PEP 8:

http://www.python.org/dev/peps/pep-0008/

(And I should probably go through the new SeqIO code and make sure it 
complies!)

Peter




More information about the Biopython-dev mailing list