Skip to content

Commit d89eb2f

Browse files
[3.14] pythongh-140873: Fix the singledispatchmethod documentation (pythonGH-141523)
It does not support non-descriptor callables yet.
1 parent 3388413 commit d89eb2f

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
@@ -672,7 +672,7 @@ The :mod:`functools` module defines the following functions:
672672
dispatch>` :term:`generic function`.
673673

674674
To define a generic method, decorate it with the ``@singledispatchmethod``
675-
decorator. When defining a function using ``@singledispatchmethod``, note
675+
decorator. When defining a method using ``@singledispatchmethod``, note
676676
that the dispatch happens on the type of the first non-*self* or non-*cls*
677677
argument::
678678

Lib/functools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,8 +995,7 @@ def wrapper(*args, **kw):
995995
class singledispatchmethod:
996996
"""Single-dispatch generic method descriptor.
997997
998-
Supports wrapping existing descriptors and handles non-descriptor
999-
callables as instance methods.
998+
Supports wrapping existing descriptors.
1000999
"""
10011000

10021001
def __init__(self, func):

0 commit comments

Comments
 (0)