[Tutor] Error handling resource needed
Scot W. Stevenson
scot@possum.in-berlin.de
Thu, 22 Aug 2002 16:52:55 +0200
Hello Arthur,
> Have the 1200 page book Programming Python, e.g.,
> which surprisingly has next to nothing on the subject -
> at least that I can locate.
O'Reilly talks about exceptions in the companion book "Learning Python"
(Mark Lutz and David Ascher) in Chapter 7 starting on page 194, which is
probably why their "Programming Python" doesn't have too much on it. Note
both books are somewhat dated by now, "Learning" slightly less so because
the core toolset isn't changing quite as fast. Unless, of course, it
happens to involve division. Or list comprehension. Or generators. Or -
Anyway, if you want to stick with O'Reilly, there is new book out called
the "Python Cookbook" (Alex Martelli and David Ascher), which I am reading
a few pages a day on public transport. It has some very good explanations
of how to use exceptions using the "Easier to Ask Forgiveness than
Permission" (EAFP) approach that I hadn't seen anywhere else so far, but
of course it is not a systematic introduction. You'd have to hunt and peck
thru the examples.
[Note: I'm not far enough into the book to feel comfortable enough to
recommend it to anybody yet (all cliches aside, Berlin public transport is
terribly efficient), but the 36 pages I have read so far have been very
enlightening on many things Pythonic, and of course it includes all too
rare examples of commented Python 2.2 code. Looks like a good one so far.]
Y, Scot
--
Scot W. Stevenson wrote me on Thursday, 22. Aug 2002 in Zepernick, Germany
on his happy little Linux system that has been up for 1573 hours
and has a CPU that is falling asleep at a system load of 0.01.