]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
authorDevilXD <DevilXD@users.noreply.github.com>
Sat, 10 Apr 2021 22:36:40 +0000 (00:36 +0200)
committerGitHub <noreply@github.com>
Sat, 10 Apr 2021 22:36:40 +0000 (15:36 -0700)
(The deleted example no longer works and is thus irrelevant.)

Doc/library/typing.rst

index f6d1ccb1c5b3d8f81111cd6cea9b274707312481..8af57f34a6d25288d5e4ad42d792c00cc9b87f05 100644 (file)
@@ -1144,10 +1144,7 @@ These are not used in annotations. They are building blocks for creating generic
    .. note::
 
         :func:`runtime_checkable` will check only the presence of the required methods,
-        not their type signatures! For example, :class:`builtins.complex <complex>`
-        implements :func:`__float__`, therefore it passes an :func:`issubclass` check
-        against :class:`SupportsFloat`. However, the ``complex.__float__`` method
-        exists only to raise a :class:`TypeError` with a more informative message.
+        not their type signatures.
 
    .. versionadded:: 3.8