Python in a Nutshell by Alex Martelli The following errata were *corrected* in the 8/04 reprint: Here's the key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem (76) middle of page; print x.e, x.d, x.c, x.b. x.a NOW READS: print x.e, x.d, x.c, x.b, x.a (100) Last sentence, 5th paragraph; "Since type(object) is type, a class C that inherits from object (or some other built- in type) gets the same metaclass as object (i.e., type(C), C's metaclass, is also type) Thus, being a new-style class is synonymous with having type as the metaclass." "Thus, being..." is the start of a second sentence. A period HAS BEEN ADDED to the end of the sentence "Since type(object)...". [202] Example code, data_to_zip_direct; To make the example work the same way for both the direct and indirect method, the line: zinfo.compress_type = zipfile.ZIP_DEFLATED HAS BEEN ADDED after the line: zinfo = zipfile.ZipInfo(name, time.localtime()[:6]) [222] 11th line gettext.translation(domain, languages=lang) NOW READS: gettext.translation(domain, languages=[lang]) [346] code sample at very bottom; def makeshow(menu): def emit(entry, menu=menu): print menu, entry return emit NOW READS: def mkshow(menu, entry): def emit(): print menu, entry return emit AND the first two lines on the top of page 347; and use command=mkshow('File') and command=mkshow('Edit'), respectively, in the calls to the add_command methods of fil and edi. NOW READ: and use command=mkshow('File', x) and command=mkshow('Edit', x), respectively, in the calls to the add_command methods of fil and edi. {383} second code sample; try: x.f() except AttributeError: sys.stderr.write('x is type %s, (%r)\n'%(x,type(x))) That 3rd line NOW READS: sys.stderr.write('x is type %s, (%r)\n'%(type(x), x)) [445] example 19-6; the final lines of code (at the end of the "for x in i: portion of the example"): try: ous.remove(x) except ValueError: pass x.close() NOW READ: try: ous.remove(x) except ValueError: pass x.close() ins.remove(x) {569} Bottom paragraph; The Installer website NOW READS: http://www.mcmillan-inc.com/install1.html