.. _consider-using-tuple:

consider-using-tuple / R6102
============================

**Message emitted:**

Consider using an in-place tuple instead of list

**Description:**

*Only for style consistency! Emitted where an in-place defined ``list`` can be replaced by a ``tuple``. Due to optimizations by CPython, there is no performance benefit from it.*

**Problematic code:**

.. literalinclude:: /data/messages/c/consider-using-tuple/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/c/consider-using-tuple/good.py
   :language: python




.. 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.