[Python-checkins] bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)

gvanrossum webhook-mailer at python.org
Sat Apr 10 18:36:47 EDT 2021


https://github.com/python/cpython/commit/ac05f82ad4983e3d3653ae7494c1ff62c4a265fc
commit: ac05f82ad4983e3d3653ae7494c1ff62c4a265fc
branch: master
author: DevilXD <DevilXD at users.noreply.github.com>
committer: gvanrossum <gvanrossum at gmail.com>
date: 2021-04-10T15:36:40-07:00
summary:

bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)

(The deleted example no longer works and is thus irrelevant.)

files:
M Doc/library/typing.rst

diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index f6d1ccb1c5b3d..8af57f34a6d25 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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
 



More information about the Python-checkins mailing list