.. _singledispatch-method:

singledispatch-method / E1519
=============================

**Message emitted:**

singledispatch decorator should not be used with methods, use singledispatchmethod instead.

**Description:**

*singledispatch should decorate functions and not class/instance methods. Use singledispatchmethod for those cases.*

**Problematic code:**

.. literalinclude:: /data/messages/s/singledispatch-method/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/s/singledispatch-method/good.py
   :language: python



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