cpython/Doc/reference
Colin Watson c95f8bc270
bpo-42669: Document that except rejects nested tuples (GH-23822)
In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural.  For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this:

    try:
        self.getInputValue()
        return True
    except (InputErrors, SomethingElse):
        return False

As of Python 3.0, this raises `TypeError: catching classes that do not inherit from BaseException is not allowed` instead: one must instead either break it up into multiple `except` clauses or flatten the tuple.  However, the reference documentation was never updated to match this new restriction.  Make it clear that the definition is no longer recursive.

Automerge-Triggered-By: GH:ericvsmith
2020-12-20 10:24:10 -08:00
..
compound_stmts.rst bpo-42669: Document that except rejects nested tuples (GH-23822) 2020-12-20 10:24:10 -08:00
datamodel.rst [doc] Fix a few margins due to bad markup (GH-23619) 2020-12-17 09:25:55 -08:00
executionmodel.rst Doc: Add -m reference in context of code execution (GH-16045) 2019-09-12 14:19:06 +01:00
expressions.rst bpo-41229: Update docs for explicit aclose()-required cases and add contextlib.aclosing() method (GH-21545) 2020-11-02 00:02:48 -08:00
grammar.rst bpo-42485: [Doc] Link to PEP 617 from full grammar specification (GH-23532) 2020-11-30 19:08:26 +00:00
import.rst bpo-35181: Correct importlib documentation for some module attributes (GH-15190) 2020-10-21 14:17:35 -07:00
index.rst
introduction.rst bpo-41762: Fix usage of productionlist markup in the doc (GH-22281) 2020-09-18 09:10:15 +02:00
lexical_analysis.rst bpo-41762: Fix usage of productionlist markup in the doc (GH-22281) 2020-09-18 09:10:15 +02:00
simple_stmts.rst [doc] Mention with and except clauses in globals() (GH-13232) 2020-12-19 16:48:06 +01:00
toplevel_components.rst bpo-41762: Fix usage of productionlist markup in the doc (GH-22281) 2020-09-18 09:10:15 +02:00