raise None
Ben Finney
ben+python at benfinney.id.au
Wed Dec 30 20:44:01 EST 2015
Steven D'Aprano <steve at pearwood.info> writes:
> Traceback (most recent call last):
> File "spam", line 19, in this
> File "spam", line 29, in that
> File "spam", line 39, in other
> File "spam", line 5, in _validate
> ThingyError: ...
>
> and the reader has to understand the internal workings of _validate
> sufficiently to infer that this exception is not a bug in _validate
> but an expected failure mode of other when you pass a bad argument.
This point seems to advocate for suppressing *any* code that
deliberately raises an exception. Is that your intent?
--
\ “I don't want to live peacefully with difficult realities, and |
`\ I see no virtue in savoring excuses for avoiding a search for |
_o__) real answers.” —Paul Z. Myers, 2009-09-12 |
Ben Finney
More information about the Python-list
mailing list