.. _too-many-try-statements:

too-many-try-statements / W0717
===============================

**Message emitted:**

%s

**Description:**

*Try clause contains too many statements.*

**Problematic code:**

.. literalinclude:: /data/messages/t/too-many-try-statements/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/t/too-many-try-statements/good.py
   :language: python




.. note::
  This message is emitted by the optional :ref:`'broad_try_clause'<pylint.extensions.broad_try_clause>`
   checker which requires the ``pylint.extensions.broad_try_clause`` plugin to be loaded.

Created by the `broad_try_clause <https://github.com/PyCQA/pylint/blob/main/pylint/extensions/broad_try_clause.py>`__ checker.