We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09bbebe commit ac05f82Copy full SHA for ac05f82
Doc/library/typing.rst
@@ -1144,10 +1144,7 @@ These are not used in annotations. They are building blocks for creating generic
1144
.. note::
1145
1146
: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.
+ not their type signatures.
1151
1152
.. versionadded:: 3.8
1153
0 commit comments