[Python-ideas] Python Numbers as Human Concept Decimal System
Mark H. Harris
harrismh777 at gmail.com
Sat Mar 8 08:50:38 CET 2014
On Saturday, March 8, 2014 12:52:32 AM UTC-6, Mark H. Harris wrote:
> but Guido has developed this one into something concrete and feasible:
>> change the default conversion from float to Decimal (that is,
>> Decimal(float)) to use the repr.
>>
>
> What you and Guido are discussing is perfect. Thank you.
>
Guido, Andrew, I have a question about repr() in my current codes for
3.3.4 and below:
Would it be reasonable to add a function to pdeclib to be used internally
like this:
def Dec(numform):
return Decimal(repr(numform))
Does this work correctly (for pdeclib internally) ? I think this works
better than my first
stab at this (just using str() ) because repr() acts like an eval() ??
Do I understand this correctly?
It looks like what you are proposing will fix the problem I've been whining
about. Thank you.
marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140307/804b56a7/attachment.html>
More information about the Python-ideas
mailing list