Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 16th, 2012  |  syntax: None  |  size: 0.82 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Typos in Expert Python Programming that have not reported in errata.
  2.  
  3. p.64  double quote is missed and extra parenthesis
  4. ...                 raise DistinctError((“This value already
  5. ...                                   “exists for ‘%s’”) % \
  6. ...                             str(self[existing_key]))
  7. should be
  8. ...                 raise DistinctError("This value already "
  9. ...                                     "exists for ‘%s’" %
  10. ...                                     str(self[existing_key]))
  11.  
  12. p.64 . should be :
  13. ...     def dir(self):
  14. ...         print 'I am the %s folder.' % self.name
  15. should be
  16. ...     def dir(self):
  17. ...         print 'I am the %s folder:' % self.name
  18.  
  19. p. 71
  20. >>> from random import Random
  21. >>> random.Random.__mro__
  22. should be
  23. >>> from random import Random
  24. >>> Random.__mro__