]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-140873: Fix the singledispatchmethod documentation (GH-141523)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 18 Nov 2025 11:16:39 +0000 (13:16 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Nov 2025 11:16:39 +0000 (13:16 +0200)
It does not support non-descriptor callables yet.

Doc/library/functools.rst
Lib/functools.py

index 8028cfc34d7e26957b472a729c67bf2dffd3002a..01db54bbb86c4ff813838a27fa3b3a7dbe6e68fb 100644 (file)
@@ -672,7 +672,7 @@ The :mod:`functools` module defines the following functions:
    dispatch>` :term:`generic function`.
 
    To define a generic method, decorate it with the ``@singledispatchmethod``
-   decorator. When defining a function using ``@singledispatchmethod``, note
+   decorator. When defining a method using ``@singledispatchmethod``, note
    that the dispatch happens on the type of the first non-*self* or non-*cls*
    argument::
 
index 7f0eac3f65020993fd6b8c0c3b106fead054322f..df4660eef3fe820d2396b69ec4541f6e66c8be4b 100644 (file)
@@ -995,8 +995,7 @@ def singledispatch(func):
 class singledispatchmethod:
     """Single-dispatch generic method descriptor.
 
-    Supports wrapping existing descriptors and handles non-descriptor
-    callables as instance methods.
+    Supports wrapping existing descriptors.
     """
 
     def __init__(self, func):