[Python-Dev] prePEP: Decimal data type

Alex Martelli aleaxit at yahoo.com
Fri Oct 31 14:42:41 EST 2003


On Friday 31 October 2003 07:36 pm, Batista, Facundo wrote:
   ...
> If it all goes ok, it'll be a PEP when I finish writing/modifying the code.

I'll gladly help fix the English if needed then, let me know.

> When passing floating point to the constructor, what should happen?
>
>     j. ``Decimal(1.1) == Decimal('1.1')``
>     k. ``Decimal(1.1) ==
> Decimal('110000000000000008881784197001252...e-51')``

You forgot an alternative that's likely to be popular on python-dev: "an 
exception is raised".  (This would change requirement 2. later, of
course).


Alex




More information about the Python-Dev mailing list