.. _comparison-with-itself:

comparison-with-itself / R0124
==============================

**Message emitted:**

Redundant comparison - %s

**Description:**

*Used when something is compared against itself.*

**Problematic code:**

.. literalinclude:: /data/messages/c/comparison-with-itself/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/c/comparison-with-itself/good.py
   :language: python



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