.. _bad-reversed-sequence:

bad-reversed-sequence / E0111
=============================

**Message emitted:**

The first reversed() argument is not a sequence

**Description:**

*Used when the first argument to reversed() builtin isn't a sequence (does not implement __reversed__, nor __getitem__ and __len__*

**Problematic code:**

.. literalinclude:: /data/messages/b/bad-reversed-sequence/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/b/bad-reversed-sequence/good.py
   :language: python



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