[Biopython] A potential printing error in the Biopython Tutorial and Cookbook?

ANGEL VILLAHOZ-BALETA villahozbale at wisc.edu
Fri Dec 11 18:32:53 UTC 2009


Hi to all,

I believe that there is a printing error in the Biopython Tutorial and Cookbook...

Go there:

http://www.biopython.org/DIST/docs/tutorial/Tutorial.html#htoc102

Then check the following source code:

>>> for record in records:
...     print "title:", record["TI"]
...     if "AU" in records:
...         print "authors:", record["AU"]
...     print "source:", record["CO"]
...     print

I believe that the if sentence would have the record instead of the records because it would never print such an information about the authors since the data structure of records does not have this key but always integers as its indices.

Let me know if I am right or not.

Thanks very much,

Angel Villahoz-Baleta
Bioinformatics Programmer
University of Wisconsin-Madison



More information about the Biopython mailing list