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

Guido van Rossum report at bugs.python.org
Wed Mar 28 21:58:59 EDT 2018


Guido van Rossum <guido at python.org> added the comment:

It's not necessary for complex() and bytes() to call the special methods if the argument's type is exactly complex or bytes (respectively) -- these cases are already taken care of by the current code.  But adding these special methods enables other code to be more regular, without having to test for the special cases.

----------

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


More information about the Python-bugs-list mailing list