.. _consider-using-namedtuple-or-dataclass:

consider-using-namedtuple-or-dataclass / R6101
==============================================

**Message emitted:**

Consider using namedtuple or dataclass for dictionary values

**Description:**

*Emitted when dictionary values can be replaced by namedtuples or dataclass instances.*


**Correct code:**

.. literalinclude:: /data/messages/c/consider-using-namedtuple-or-dataclass/good.py
   :language: python

**Additional details:**

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



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

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