[Biopython-dev] GSoC Weekly Update: PhyloXML for Biopython

Peter biopython at maubp.freeserve.co.uk
Fri Jun 19 12:40:08 UTC 2009


On Fri, Jun 19, 2009 at 1:25 PM, Brad Chapman<chapmanb at 50mail.com> wrote:
> Eric and Peter;
>
>> > Still unclear: why doesn't the SeqRecord constructor take annotations
>> > as an optional argument? Should it?
>>
>> I don't know why it doesn't (its a historical design choice before my time),
>> do you think it would actually be more useful? Maybe Brad can comment?
>>
>> P.S. See also related Bug 2841
>> http://bugzilla.open-bio.org/show_bug.cgi?id=2841
>
> My recollection of the history here is hazy, but based on the code comments
> we were probably running into this problem without realizing it:
>
> http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm
>
> It should be easy enough to allow passing in annotations and
> letter_annotations by setting the function defaults to None and doing the
> if annotations is None: annotations = {} trick.
>
> My vote is for adding this.

That thought did occur to me last night - having fallen over the same
problem myself once before. Would you like to update the SeqFeature
along those lines then?

Peter



More information about the Biopython-dev mailing list