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

Brad Chapman chapmanb at 50mail.com
Fri Jun 19 12:25:49 UTC 2009


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 by 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.

Brad



More information about the Biopython-dev mailing list