Stefan Krah added the comment: Alexander Belopolsky <rep...@bugs.python.org> wrote: > Raymond suggested that "The PEP 3141 should be revised to say that floor > division is defined to return a value that is *equal* to an Integral".
I guess it should say "equal to an Integral or a special value". > Since nan or inf are not *equal* to any Integral, the current implementation > does not comply. In the absence of a recommendation in the PEP, implementers > of new numeric types are left with little guidance because existing types are > inconsistent: > > >>> Decimal('inf') // 1 > Decimal('Infinity') > >>> float('inf') // 1 > nan I think both should return inf. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22444> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com