.. _too-many-instance-attributes:

too-many-instance-attributes / R0902
====================================

**Message emitted:**

Too many instance attributes (%s/%s)

**Description:**

*Used when class has too many instance attributes, try to reduce this to get a simpler (and so easier to use) class.*

**Problematic code:**

.. literalinclude:: /data/messages/t/too-many-instance-attributes/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/t/too-many-instance-attributes/good.py
   :language: python



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