[issue43453] docs: runtime_checkable example refers to changed behavior in 3.10
New submission from Henry Schreiner <henryschreineriii@gmail.com>: The documentation here: https://docs.python.org/3/library/typing.html#typing.runtime_checkable refers to "For example, builtins.complex implements __float__(), therefore it passes an issubclass() check against SupportsFloat. However, the complex.__float__ method exists only to raise a TypeError with a more informative message.". However, that's not true in Python 3.10 anymore, those methods were thankfully removed. See https://docs.python.org/3.10/whatsnew/3.10.html#removed or https://bugs.python.org/issue41974 for the removal. This documentation should either say "before Python 3.10, ...", or pick some other example that still is valid. Happy to make the change if I know what direction this should go. ---------- assignee: docs@python components: Documentation messages: 388387 nosy: Henry Schreiner, docs@python priority: normal severity: normal status: open title: docs: runtime_checkable example refers to changed behavior in 3.10 type: behavior versions: Python 3.10 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43453> _______________________________________
participants (1)
-
Henry Schreiner