[docs] Incorrect statement in section 8.3 of Python Tutorial

Zachary Ware zachary.ware+pydocs at gmail.com
Thu Nov 30 15:01:56 EST 2017


Hi Randy,

On Mon, Nov 27, 2017 at 1:19 PM, Randy Duncan <randy.duncan at ibm.com> wrote:
> I believe I found an erroneous statement in the Python tutorials.
>
> In section 8.3 found here (https://docs.python.org/3.6/tutorial/errors.html)
>
> There is a section showing how to handle exceptions which works as
> advertised:
>
>
> However, the next line in the tutorial state this:
>
>
> Note that if the except clauses were reversed (with except B first), it
> would have printed B, B, B — the first matching except clause is triggered.
>
>
> I re-entered the example and reversed the except clauses, and got this
> result which does not match the statement:

Thanks for the report!  However, I just tried it myself and got the
output predicted by the docs.  Can you show how you defined B, C, and
D?

Regards,
-- 
Zach


More information about the docs mailing list