Skip to content

Commit ac05f82

Browse files
authored
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
(The deleted example no longer works and is thus irrelevant.)
1 parent 09bbebe commit ac05f82

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Doc/library/typing.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,10 +1144,7 @@ These are not used in annotations. They are building blocks for creating generic
11441144
.. note::
11451145

11461146
:func:`runtime_checkable` will check only the presence of the required methods,
1147-
not their type signatures! For example, :class:`builtins.complex <complex>`
1148-
implements :func:`__float__`, therefore it passes an :func:`issubclass` check
1149-
against :class:`SupportsFloat`. However, the ``complex.__float__`` method
1150-
exists only to raise a :class:`TypeError` with a more informative message.
1147+
not their type signatures.
11511148

11521149
.. versionadded:: 3.8
11531150

0 commit comments

Comments
 (0)