.. _global-statement:

global-statement / W0603
========================

**Message emitted:**

Using the global statement

**Description:**

*Used when you use the "global" statement to update a global variable. Pylint just try to discourage this usage. That doesn't mean you cannot use it !*

**Problematic code:**

.. literalinclude:: /data/messages/g/global-statement/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/g/global-statement/good.py
   :language: python



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