On Thu, Nov 12, 2020 at 8:49 PM Guido van Rossum <gu...@python.org> wrote:

> The correct place for the docs for __cause__ and __context__ is in the
> section in the library reference about exceptions. There's quite a bit
> about them there already. That's where the tutorial should link as well.
>
> And now I ask you to stop complaining (your "the PEPs are the worst" does
> not help your cause).
>
> On Thu, Nov 12, 2020 at 12:30 PM Riccardo Polignieri via Python-Dev <
> python-dev@python.org> wrote:
>
>> > There is value in having non-trivial coverage of the language.  When
>> people ask how
>> > __cause__ works, we can link to the tutorial.
>> [...]
>
>
A Google search here for

    python tutorial __cause__

returns as its first hit https://docs.python.org/3/library/exceptions.html
(the very section to which it seems you refer). There is a terse but
adequate description of __cause there__. It seems unhelpful that the
permalink for __cause__ (
https://docs.python.org/3/library/traceback.html?highlight=__cause__#traceback.TracebackException.__cause__)
links back to itself, but that's the nature of the beast with nested
exceptions -- it's __cause__s and __context__s all the way down.

A search for __cause__ using the documentations search feature leads to the
same loop of links noted above. In either case, if the curious reader
follows the traceback_exception link (
https://docs.python.org/3/library/traceback.html?highlight=__cause__#traceback.TracebackException)
they are moved up five lines whereupon the context becomes more
obvious.Those who find it intimidating may be a little out of their
depth, as this is hardly beginner material.

The tutorial was not mentioned in the docs search and the third hit in
my Google search, linking to https://docs.python.org/3/tutorial/errors.html.
Somewhat ironically, __cause__ is not mentioned on that page.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/FU5CQKXAZD5KK54KFOE26JM636MHFJYO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to