[Python-ideas] Python Numbers as Human Concept Decimal System

Chris Angelico rosuav at gmail.com
Tue Mar 11 18:19:08 CET 2014


On Wed, Mar 12, 2014 at 4:09 AM, Oscar Benjamin
<oscar.j.benjamin at gmail.com> wrote:
> I'm not sure if any other languages have the same model as Python's
> decimal module except possibly REXX. I don't have any experience of
> REXX but from a quick read of some docs the "numeric digits"
> instruction seems to have the same global effect as the decimal
> module's contexts.

Yes, it does. I'm more familiar with numeric digits than with Python's
decimal contexts, but they definitely seem to be doing the same thing.
(Does Python have an equivalent of 'numeric fuzz N', which basically
defines numeric equality as "reduce precision by N digits, round both
numbers, then see if they're equal"?)

ChrisA


More information about the Python-ideas mailing list