Exception Handling Practices / Patterns
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sat Aug 24 19:11:52 EDT 2013
On Sat, 24 Aug 2013 15:57:55 -0400, Terry Reedy wrote:
>> # Worst
>> except:
>>
>> Don't use the last one, except maybe in the interactive interpreter,
>
> Stick with never. "except:" means the same thing as "except
> BaseException:", except that the latter indicates a deliberate choice
> rather than an indication of carelessness or laziness.
>
> A bare except: is a disservice to the next maintainer of the code.
Do you know anyone who maintains code typed in the interactive
interpreter?
:-)
--
Steven
More information about the Python-list
mailing list