[Python-ideas] isinstance(Decimal(), Real) -> False?
Vernon D. Cole
vernondcole at gmail.com
Wed Aug 28 12:30:36 CEST 2013
Darn right it should return False. Given the principle of least surprise
(and my prejudices built up over 40 years as a computer programmer) I would
expect that decimal.Decimal data would be stored internally as some form of
decimal data, and would store into a database as such. It would be
expected to be in a fixed point format. Real, on the other hand, I would
expect to be stored as an IEEE double precision floating point number, or
something like that.
I don't care whether a fixed point decimal number might be defined by a
mathematician as "real" -- I care whether it can be processed by an FPU,
and whether it will loose precision in large financial calculations.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130828/f625d86c/attachment.html>
More information about the Python-ideas
mailing list