.. _nonlocal-without-binding:

nonlocal-without-binding / E0117
================================

**Message emitted:**

nonlocal name %s found without binding

**Description:**

*Emitted when a nonlocal variable does not have an attached name somewhere in the parent scopes*


**Correct code:**

.. literalinclude:: /data/messages/n/nonlocal-without-binding/good.py
   :language: python

**Additional details:**

You can help us make the doc better `by contributing <https://github.com/PyCQA/pylint/issues/5953>`_ !


Created by the `basic <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/base/basic_error_checker.py>`__ checker.