Errata
The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted By | Date submitted | Date corrected |
---|---|---|---|---|---|
1.3.3 2nd example |
"For a string of length N, an index (i.e., the value between square brackets) must be in the range -N <= index < N-1." |
Peter Combs | Mar 04, 2010 | ||
Printed | Page 4 Last amino acid sequence example |
The sequence: Note from the Author or Editor: |
Mark Morrissey | Dec 29, 2012 | |
Page 7 middle of the page |
"In Python 2, it would have printed as 0.0089999999999999993, and 0.003 would have printed as 0.0089999999999999993." |
Stefan Schmidt | Aug 03, 2010 | ||
PDF, Other Digital Version | Page 8 middle |
The explanation of conditional expressions is incorrect: "Written using the keywords if and else, it returns the value **preceding** (not following) the if when the condition is true and the value following the else when it is false. |
Tim Pietzcker | Aug 16, 2010 | |
Printed | Page 8 penultimate interactive prompt part |
>>> 'no' if 1 % 2 else 'no' Note from the Author or Editor: |
Anonymous | Mar 07, 2012 | |
Printed | Page 8 Bottom |
The example Note from the Author or Editor: |
Mark Morrissey | Dec 29, 2012 | |
Page 8 Last Boolean operation example near top of page |
Example is missing Python interpreter output. Note from the Author or Editor: |
Kevin Ford | Jan 04, 2013 | ||
Page 10 3rd example, 1st paragraph |
>>> 'MNKMDLVADVAEKTDLSKAKATEVIDAVFA'[7//2] Note from the Author or Editor: |
S. Hessam Moosavi Mehr | Jun 07, 2010 | ||
Page 11 1st example of last paragraph |
>>> 'MNKMDLVADVAEKTDLSKAKATEVIDAVFA'[:8] |
Stefan Schmidt | Jun 16, 2010 | ||
Printed | Page 11 output |
on Page 11, the output ist wrong: Note from the Author or Editor: |
Anonymous | Nov 08, 2010 | |
Page 15 last paragraph |
string1.find(string2[, start[, end]]) |
Stefan Schmidt | Jun 17, 2010 | ||
Page 19 3rd paragraph |
You can use Ctrl-P or the down arrow to move to a later Note from the Author or Editor: |
Patrick Augereau | Sep 07, 2011 | ||
Page 29 Example 2-5 |
seq = base_seq.upper() Note from the Author or Editor: |
Patrick Augereau | Sep 08, 2011 | ||
Page 32 Example 2-10. Adding an assertion to the gc_content function |
>>>return ((base_seq.count('G') + base_seq.count('C')) / Note from the Author or Editor: |
Michele Seeber | Mar 09, 2010 | ||
Page 33 Example 2-12. Adding a default value for the flag parameter |
>>> validate_base_sequence('AUCG') |
TALHA KARABIYIK | Dec 21, 2009 | ||
Page 38 first code block, replace_base_randomly_using_names function |
The code line: Note from the Author or Editor: |
Steven Jackson | Sep 28, 2011 | ||
Printed | Page 38 Example 2-15 |
newbase = bases[randint(0,2)] Note from the Author or Editor: |
Mariana | Aug 28, 2012 | |
Printed | Page 39 definition of recognition_site |
The lines with the doc string and return statement should each begin with an additional space. In the definition of test, True and False should be exchanged. |
Mitchell L Model |
Jan 18, 2010 | |
Page 39 Example 2-18 |
1) gc_content doesn't work with lowercase input because of a minor mistake: |
S. Hessam Moosavi Mehr | Jun 07, 2010 | ||
Printed | Page 52 bottom |
The title of Table 3-7 should be "Operations generally supported by sequence types" |
Mitchell L Model |
Aug 29, 2010 | |
Printed | Page 54 bottom of page |
under creating char(n) should be chr(n), ord(char) should be ord(chr) Note from the Author or Editor: |
Shira Rockowitz | Jan 26, 2010 | |
Printed | Page 55 bottom of page |
str1.endswith(str2[, startpos, [endos]]) should be str1.endswith(str2[, startpos, [endpos]]) |
Shira Rockowitz | Jan 26, 2010 | |
Page 55 In the list "Testing" methods |
str1.numeric() should be str1.isnumeric() Note from the Author or Editor: |
Anonymous | Oct 06, 2011 | ||
Page 69 Example 3-3 |
Error in RNA_codon_table: Note from the Author or Editor: |
Benjamin Wellmann | Dec 28, 2010 | ||
Printed | Page 80 Example 3-7 |
Delete one of the two spaces between "return" and "all". |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 82 Example 3-11 |
Replace the body of the definition of read_FASTA_sequences with: |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 83 Example 3-12 |
Remove "[1:]" from the first line of the body of read_FASTA_sequences. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 85 Example 3-16 |
replace [0] with [1] |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 88 first three lines |
Replace with: |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 88 Example 3-22 |
The definition of first_common can be used with any two collections, so (1) replace "list1" and "list2" with "collection1" and "collection2"; and (2) in the sentence preceding the example replace "list" with "collection". |
Mitchell L Model |
Jan 18, 2010 | |
Page 93 First use of "some" function in Example 3-24 |
I think the returned value would be False each time "some" is called with the same arguments. I suspect that the arguments are wrong in the first call to "some". Note from the Author or Editor: |
R. Mark Sharp | Jul 04, 2010 | ||
Page 93 End of page |
I think the sentence order in the last paragraph should be reversed. The first sentence describes the sixth and seventh calls to "some" and the second sentence describes the fourth and fifth calls to "some". This was confusing at first. |
R. Mark Sharp | Jul 04, 2010 | ||
Printed | Page 93 Example 3-24 |
In Example 3-24, it states |
John Blischak | Dec 14, 2010 | |
Printed | Page 119 Example 4-15 |
First line after the docstring of extract_gi_id should be indented four spaces fewer and "line" should be replaced with "description". |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 121 Table 4-1 |
Add a right parentheses at the end of the code on the right side of the table. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 122 Table 4-2 |
There should be no line break after "def" at the beginning of the table. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 122 Table 4-3 |
On the right side of the table insert a right parentheses between the right parentheses and right bracket. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 125 Example 4-19 |
In the definition of is_number replace "elt" with "value" |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 127 Example 4-22 |
Add a colon at the end of the first line of the definition of list_sequences_in_file. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 127 Example 4-27 |
First line after the doc string of extract_gi_id should be indented four spaces fewer and "line" should be replaced with "description". |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 134 Example 4-27 |
First line after the doc string of extract_gi_id should be indented four spaces fewer and "line" should be replaced with "description". Note from the Author or Editor: |
Anonymous | Mar 07, 2012 | |
Printed | Page 143 Example 4-29 |
The last two lines should be indented an additional 6 spaces each. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 143 Example 4-29 |
In the definition of get_gene_info_from_file the open statement should have a second argument: |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 143 In paragraph following title "Extracting Information from an HTML File" |
Replace "sites/entrez" with "gene" in the URL for Entrez Gene. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 143 In paragraph following title "Extracting Information from an HTML File" |
Before "click the search button" add "select Gene from the dropdown to the left of the search box, " |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 146 Example 4-30 |
Remove the argument "testfn" from the call to item_generator at the beginning of find_item. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 147 Example 4-30 |
The next to last line of item_generator should eliminate the initial '>' and final '\n', reading: |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 149 Example 4-31 |
Rename next_item to item_generator and add the following definition: |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 151 Example 4-31 |
This section should refer to DNA throughout, not RNA. Change "RNA" to "DNA" in the title and the first sentence of the subsequent paragraph, as well as in the Table of Contents. The last sentence of that paragraph should be replaced with the "This example, though, will be based on DNA, instead of RNA, codons. (For the purpose of this example we are pretending that DNA is directly translated into amino acids rather than first being transcribed into RNA which is then tranlsated into amino acid sequences.)" |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 152 Example 4-32 |
The table should contain DNA codons not RNA codons: replace U with T throughout the table. Likewise, replace "RNA" with "DNA" in the function definition and the example title. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 152 Example 4-33 |
Replace "RNA" with "DNA" in the code and the example title |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 153 Example 4-34 |
"print" in the definition of print_translation_in_frame should line up with the first quote of the doc string |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 153 Example 4-34 |
Replace "RNA" with "DNA" in the code and the example title |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 153 Example 4-35 |
Replace "RNA" with "DNA" in the code and the example title |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 153 Example 4-35 |
In definition of translate_with_open_reading_frames "frame-1" should be "framenum-1" |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 154 Examples beginning with ">>>" |
Replace "print_translations" with "print_translations_with_open_reading_frame" |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 154-155 Examples beginning with ">>>" |
Replace "print_translations" with "print_translations_with_open_reading_frame_in_both_directions" |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 154 Example 4-36 |
Replace "RNA" with "DNA" in the example title |
Mitchell L Model |
Jan 18, 2010 | |
Page 155 Footnote 2 |
The following sentence should appear at the end of the footnote: "The idea to use the restriction enzyme database as an example comes from James Tisdall's Beginning Perl for Bioinformatics, O'Reilly Media, 2001. |
Mitchell L Model |
Aug 22, 2010 | ||
Printed | Page 157 Example 4-38 |
Add a colon to the end of the first line of the definition of load_enzyme_data_into_table |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 158 Example 4-39 |
Add a colon to the end of the first line of the definition of load_enzyme_data_into_table |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 159 Near top |
In the definition of test, delete the second space after "result =", and change "== 2" to "== 3559" in the first assertion statement. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 162 Definition of expect_equal |
Add a right parentheses at the end of the doc string |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 187 second def of Example 5-2 |
In the definition of __repr__, delete a space before the first quote of the doc string and before "repr" on the second line of the return statement. |
Mitchell L Model |
Jan 27, 2010 | |
Printed | Page 191 Last line of page |
add: |
Mitchell L Model |
Jan 27, 2010 | |
Printed | Page 198 Example 5-7 |
In the definition of gc_content replace "get_sequence" with "get_sequence()". |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 202 Example 5-9 |
change class AmbiguousDNASequence(DNASequence): to |
Shira Rockowitz | Jan 26, 2010 | |
Printed | Page 203 below Figure 5-2 i |
in definition of complement get rid of first self in self(self.get_sequence) Note from the Author or Editor: |
Shira Rockowitz | Jan 26, 2010 | |
Printed | Page 203 figure caption at top of page |
The caption for Figure 5-2 should read "A deeper class hierarchy" |
Mitchell L Model |
Aug 29, 2010 | |
Printed | Page 203 Inside Figure 5-2 |
The second DNASequence from left to right at the bottom of Figure 5-2 should be ProteinSequence Note from the Author or Editor: |
Jesus A Izaguirre | Feb 27, 2011 | |
215 2nd paragraph |
The paragraph is entirely incorrect and should be deleted. In its place, the following sentence should be added to the end of the previous paragraph: "Note that output sent to both streams is "line-buffered", meaning that characters are accumulated until an end-of-line character is encountered, at which point the line is sent to the stream's actual destination. |
Mitchell L Model |
Jan 11, 2010 | ||
Printed | Page 222 Exercise 6-1 |
Remove right parentheses after "path" |
Mitchell L Model |
Jan 27, 2010 | |
Printed | Page 222 last line |
"(command)" --> "(command, shell=True)" |
Mitchell L Model |
Jan 27, 2010 | |
Printed | Page 224 First # line in Example 6-3 |
Insert before the first comment line, the line: |
Mitchell L Model |
Jan 27, 2010 | |
Printed | Page 225 line 7 |
"conneection" --> "connection" |
Mitchell L Model |
Jan 27, 2010 | |
Printed | Page 226 middle of page, just after the heading "Environment access" |
"variables" should be "values" |
Mitchell L Model |
Apr 20, 2010 | |
Printed | Page 233 last line of Example 6-9 |
"return path" --> "return path" |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 233 last line of Example 6-9 |
"return path" --> "return paths" Note from the Author or Editor: |
Anonymous | Mar 07, 2012 | |
Printed | Page 246 last line of Example 6-11 |
val --> value |
Mitchell L Model |
Feb 05, 2010 | |
Printed, PDF | Page 259 Example 7-1 |
In function multi_search, the start of the list comprehension is Note from the Author or Editor: |
Phillip Wilmarth | Dec 06, 2012 | |
Printed, PDF, ePub | Page 272 Examples 7-4 and 7-5 |
the variable "m" is not defined. Is "m" supposed to be "matchobj"? Note from the Author or Editor: |
Phillip Wilmarth | Dec 06, 2012 | |
Printed | Page 283 top |
The code for the while loop should be: |
Mitchell L Model |
Apr 18, 2010 | |
Printed | Page 297 Example 8-8 |
remove the right parenthesis from the first line |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 297 Step 5 |
Choose XML ABOVE Overview instead of Protein Table BELOW. It will take a while for the page to download. When it's done, do step 6. |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 302 Step #2 |
The information on the web page was reorganized somewhat since the book was published, but the general idea of the step is unaffected. |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 306 Example 8-11 |
remove the s from tagnames |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 310 middle of page (first bullet) |
"variables" should be "values" |
Mitchell L Model |
Apr 20, 2010 | |
Printed | Page 315 middle of last full paragraph |
"variables" should be "values" |
Mitchell L Model |
Apr 20, 2010 | |
Printed | Page 320 Example 8-17 |
Remove p in the for places it appears in |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 321 Example 8-18 |
Delete the first line after the doc string in the definition of start_element. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 321 last line of page |
indent 4 spaces |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 329 middle of Example 9-1 |
in the assignment of urlpart1, the semicolon after the question mark should be a colon |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 330 Example 9-20, next to last line on page |
Add 'name' at the end of the function name make_html_for_file |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 340 Example 9-8 |
First line on page, the l at the end of the line should be ) |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 340 Example 9-9 |
After assignments to HOST and PORT add: |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 342 Example 9-9 |
6th line from bottom: |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 344 Example 9-12 |
At the end of the definition of run replace SimpleHTTPRequestHandler with CGIHTTPRequestHandler. |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 344 Exercise 9-12 |
In the definition of run, portnum, portnumbe, and portnumber should each be just port |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 348 Example 9-15 |
table.get(sequence, set()).add(enzyme) |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 368 Example 10-1 |
replace the last 5 lines of parse_organism (the if/elif/return code) with: |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 379 Example 10-5, near the bottom of the page |
in the line after "try:" replace "get_connection" with sqlite3.connect |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 380 near top, in definition of recognition_info |
in return statement change sequence to seqdata |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 383 Example 10-8 |
max(Name, --> max(Name) |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 409 Example 11-1 |
Add footnote to the paragraph beginning "Example 11-1": |
Mitchell L Model |
Jan 18, 2010 | |
Printed | Page 409 next to last line |
add ' after Verdana |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 421 middle of Example 11-5 |
Delete the following extraneous lines are extraneous: |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 427 middle of page |
x_label_height should be xlabel_height |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 428 Example 11-10, middle of the page |
In the last line of __init__ (the call to super) filename should be ps_filename |
Mitchell L Model |
Apr 08, 2010 | |
Printed | Page 441 last line |
"+1 5" should be "+ 15" |
Mitchell L Model |
Feb 05, 2010 | |
Printed | Page 446 last bullet |
"variable" should be "name" |
Mitchell L Model |
Apr 20, 2010 | |
Page 454 Middle (Appendix A, Table A-10. Augmented numeric assignment statements) |
It's a table of two columns: Statement and Equivalent. The mistake is on the last row. Note from the Author or Editor: |
Guy Rapaport | May 14, 2011 | ||
Printed | Page 493 next to last paragraph |
"genus name" --> "species name" !!! |
Mitchell L Model |
Jan 22, 2010 |