Ram Rachum <r...@rachum.com> added the comment:

> What do you think it is necessary to switch from implicit chaining to 
> explicit chaining?

I didn't say it's necessary, but I think it's beneficial. I find that message 
between exceptions useful when I'm debugging and I'd like to keep it accurate 
in as many places as I can. 

I think that the more accurate it is, the more people will learn to trust that 
it has meaning and understand it. 

> If anyone is currently relying on __context__ vs __cause__, this patch will 
> break their code.

I think that the standard you're setting for backward compatibility is 
unreasonably high.

The only code I can think of that inspects `__context__` and `__cause__` is 
code that formats exceptions to be shown to the user, such as Django's debug 
page, Wing IDE's Exceptions pane, whatever's going on in PyCharm etc. That kind 
of code is responsible for checking for both `__context__` and `__cause__` and 
showing the correct message.

If you've seen code outside of the category above that uses `__context__`, I'd 
be curious to see it.

Fortunately, this point is moot since using `raise foo from bar` sets the 
`__context__ = __cause__ = bar`, so the `__context__` will not be changed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39717>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to