[Tutor] please return flys in ointment
Jim Mooney
cybervigilante at gmail.com
Wed Jul 10 05:22:19 CEST 2013
On 9 July 2013 18:16, Steven D'Aprano <steve at pearwood.info> wrote:
> The real point I was hoping you would take from this is that exceptions are
> not necessarily *errors*. E.g.:
>
> TypeError, ValueError, ZeroDivisionError -- all errors.
>
> SystemExit, KeyboardInterrupt, StopIteration -- not errors.
Oh, I'm quite fond of try...except. Although I see it postponed way to
the back of some books as an "advanced topic," as if it has the plague
;') I can see it's not just for errors, but the best way to do
something on many occasions. It follows the idea of '..better to ask
forgiveness than permission." Break something if it's the best way to
do things, but catch the break.
--
Jim
When the Rabbi Kaufman went to visit the Baal Shem Tove, the spiritual
light of the age, his students asked him what deep questions he would
pose the Great Master. The Rabbi Kaufman replied, "I want to see how
he ties his shoes."
More information about the Tutor
mailing list