
ePEP 327 says "it was decided to omit from_float() from the API for Py2.4". Does this imply that from_float might be in some future version? --amk

[A.M. Kuchling]
I don't think it *implies* it, but it might happen anyway. There eventually needs to be a way to combine Decimal with native binary fp, and to work naturally with Decimal in many other parts of Python too. But the immediate need for Decimal is in apps that can't tolerate the representation errors in converting between base 10 and base 2 floats, and I expect it's actually an aid to such apps if there's no builtin way to confuse binary floats with Decimals at the start. This is meant not to make the same mistake we made with Unicode <wink>: the idea that 8-bit strings can be mixed with Unicode strings, except sometimes you get mysterious data-dependent exceptions, has probably caused more overall pain than if we had forced a clean separation there at the start.
participants (2)
-
A.M. Kuchling
-
Tim Peters