A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-January/070782.html below:

[Python-Dev] Floor division

[Python-Dev] Floor divisionArmin Rigo arigo at tunes.org
Thu Jan 25 10:56:51 CET 2007
Hi Tim,

On Tue, Jan 23, 2007 at 05:14:29PM -0500, Tim Peters wrote:
> For some reason `decimal` implemented __mod__ as the proposed
> standard's "remainder" operation.  That's the immediate source of your
> surprise.  IMO `decimal` should not have implemented __mod__ at all,
> as Python's number-theoretic mod is not part of the proposed standard,
> is a poor basis for a floating-point mod regardess, and it was a
> mistake to implement decimal % decimal in a way so visibly different
> from float % float and integer % integer:  it confuses the meaning of
> "%".  That's your complaint, right?

Thanks for the clarification.  Yes, it makes sense that __mod__,
__divmod__ and __floordiv__ on float and decimal would eventually follow
the same path as for complex (where they make even less sense and
already raise a DeprecationWarning).


A bientot,

Armin.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4