[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

Terry J. Reedy report at bugs.python.org
Fri Sep 6 20:00:04 EDT 2019


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Regardless of the intention of the _xx... author, intransitive equality is objectionable as it violates the assumption of sets and dicts.  We went through this before with decimal.Decimal when the original implementation had 1.0 == 1 == Decimal(1) but 1.0 != Decimal(1).  The latter was fixed.  Here, I think the fix should be to not make the id be equal to everything it can be derived from.

----------
nosy: +terry.reedy

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


More information about the Python-bugs-list mailing list