On Sat, Feb 08, 2020 at 10:07:27AM +1100, Steven D'Aprano wrote:

> YMMV and this is just my opinion, but personally I think that exception 
> chaining is rarely useful even at the best of times. For me, the only 
> time I care about "raise from" is to suppress exception chaining by 
> setting the cause to None.

Sorry, my language there is imprecise. The chaining you get when an 
exception is raised during the handling of another exception is 
certainly useful during debugging, when the second exception is itself a 
bug.

When I said "Exception chaining", I meant the specific form of exception 
chaining where you explicitly set the cause using "raise something from 
error". I don't object to people using that feature, but for me, it 
seems like a feature looking for a use-case.



-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/3SFLPKZKAXSLDUAQX7JLBCZDETPQMBQX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to