.. _assigning-non-slot:

assigning-non-slot / E0237
==========================

**Message emitted:**

Assigning to attribute %r not defined in class slots

**Description:**

*Used when assigning to an attribute not defined in the class slots.*

**Problematic code:**

.. literalinclude:: /data/messages/a/assigning-non-slot/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/a/assigning-non-slot/good.py
   :language: python



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