[Zope3-dev] Please, no bare 'except:' clauses!

Jeremy Hylton jeremy@zope.com (Jeremy Hylton)
Mon, 11 Nov 2002 13:15:21 -0500


>>>>> "BAW" == Barry A Warsaw <barry@zope.com> writes:

  BAW> Won't multiversion concurrency control eliminate read
  BAW> conflicts?

I think it will just make them less likely, but I'm not certain.

  JH> There are very few places where bare except is needed.  At least
  JH> some of those places, the bare except is in place because it's
  JH> very hard to tell what exception Python might raise (calling
  JH> int() is an example).  In cases like that, the StandardError
  JH> solution is a good one.

  BAW> Let's see, int() can raise TypeError and ValueError.  What
  BAW> else?

OverflowError.  In theory, I think it can also raise UnicodeError.

Jeremy