[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

Takumi Kato report at bugs.python.org
Tue Mar 30 04:37:32 EDT 2021


Takumi Kato <takumi.kt+github at gmail.com> added the comment:

Recently, the situation has changed. We should consider this issue again.

typing.SupportsComplex is an ABC with one abstract method __complex__.
Thus, isinstance(complex, typing.SupportsComplex) is False.
typing.SupportsBytes also.

It is nonsense.

----------
nosy: +gyu-don

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24234>
_______________________________________


More information about the Python-bugs-list mailing list