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/070711.html below:

[Python-Dev] Floor division

[Python-Dev] Floor division [Python-Dev] Floor divisionArmin Rigo arigo at tunes.org
Sat Jan 20 12:29:34 CET 2007
Hi Tim,

On Fri, Jan 19, 2007 at 08:33:23PM -0500, Tim Peters wrote:
> >>> decimal.Decimal(-1) % decimal.Decimal("1e100")
> Decimal("-1")

BTW - isn't that case in contradiction with the general Python rule that
if b > 0, then a % b should return a number between 0 included and b
excluded?  We try hard to do that for ints, longs and floats.  The fact
that it works differently with Decimal could be unexpected.


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