mirror of
https://github.com/python/cpython.git
synced 2024-12-16 21:34:44 +08:00
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
(The deleted example no longer works and is thus irrelevant.)
This commit is contained in:
parent
09bbebea16
commit
ac05f82ad4
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user