Steven D'Aprano <st...@pearwood.info> writes:
> def _validate(a, b): 
>     if condition(a) or condition(b): return TypeError
> ...
> Obviously this doesn't work now, since raise None is an error, but if it did
> work, what do you think?

Never occurred to me.  But in some analogous situations I've caught
the exception inside _validate, then peeled away some layers of the
traceback from the exception output before throwing again.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to