Skip to content

Commit 802dfd9

Browse files
serhiy-storchakamiss-islington
authored andcommitted
[3.14] gh-140873: Fix the singledispatchmethod documentation (GH-141523)
It does not support non-descriptor callables yet. (cherry picked from commit d89eb2f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent b41963a commit 802dfd9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Doc/library/functools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ The :mod:`functools` module defines the following functions:
620620
dispatch>` :term:`generic function`.
621621

622622
To define a generic method, decorate it with the ``@singledispatchmethod``
623-
decorator. When defining a function using ``@singledispatchmethod``, note
623+
decorator. When defining a method using ``@singledispatchmethod``, note
624624
that the dispatch happens on the type of the first non-*self* or non-*cls*
625625
argument::
626626

Lib/functools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,7 @@ def wrapper(*args, **kw):
947947
class singledispatchmethod:
948948
"""Single-dispatch generic method descriptor.
949949
950-
Supports wrapping existing descriptors and handles non-descriptor
951-
callables as instance methods.
950+
Supports wrapping existing descriptors.
952951
"""
953952

954953
def __init__(self, func):

0 commit comments

Comments
 (0)