Alexander Belopolsky added the comment: Mark,
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". 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 ---------- _______________________________________ 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