.. _unsubscriptable-object:

unsubscriptable-object / E1136
==============================

**Message emitted:**

Value '%s' is unsubscriptable

**Description:**

*Emitted when a subscripted value doesn't support subscription (i.e. doesn't define __getitem__ method or __class_getitem__ for a class).*

**Problematic code:**

.. literalinclude:: /data/messages/u/unsubscriptable-object/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/u/unsubscriptable-object/good.py
   :language: python



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