Skip to content

Commit 371bff5

Browse files
committed
Add a what's new entry
Hugo can choose to delete it anything
1 parent cc2bcc7 commit 371bff5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Doc/whatsnew/3.15.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,13 @@ functools
748748
if it wraps a regular method and is called as a class attribute.
749749
(Contributed by Bartosz Sławecki in :gh:`143535`.)
750750

751+
* When registering a callable or descriptor to :func:`functools.singledispatch`
752+
or :func:`functools.singledispatchmethod` via a type annotation,
753+
it is now validated that the first non-*self* or non-*cls* parameter is used.
754+
Previously, a callable could be registered based on its return type
755+
annotation or an irrelevant parameter type annotation.
756+
(Contributed by Bartosz Sławecki in :gh:`84644`.)
757+
751758

752759
hashlib
753760
-------

0 commit comments

Comments
 (0)