[Bioperl-l] Annotated.pm

Allen Day allenday at ucla.edu
Mon Nov 29 17:26:45 EST 2004


I'll take this out.

On Sun, 28 Nov 2004, Aaron J. Mackey wrote:

> 
> 
> Allen Day wrote:
> 
> > > if you're not sure how many annotations there are, you'd better call it in
> > list context unless you want the count:
> > 
> > my @value = $feature->get_Annotations('key1');
> > my $count = $feature->get_Annotations('key1');
> > 
> > but if you're sure there is only one, you can call it either way:
> > 
> > my @value = $feature->get_Annotations('key2');
> > my $value = $feature->get_Annotations('key2');
> 
> This is the kind of thing that, while cute, makes BioPerl really hard to 
> teach to newcomers who expect things to be consistently one way or the 
> other.  To use DBI as a (formidable) example, when I call 
> $sth->fetchrow(), I'm going to get back an array, even if there was only 
> one column in that row.  I didn't see this "short cut" slip by, but I'm 
> really against things like this when they're not implemented 
> project-wide, sorry.  Something else for bioperl-nouveau ...
> 
> -Aaron
> 


More information about the Bioperl-l mailing list