On Tue, Oct 13, 2015 at 04:37:43PM -0700, Raymond Hettinger wrote:

> We could have (and still could) make the choice to always coerce to 
> decimal (every float is exactly representable in decimal).  Further, 
> any decimal float or binary float could be losslessly coerced to a 
> Fraction, but that probably isn't what you really want most of the 
> time.  I think people who work in decimal usually want to stay there 
> and people who work with binary floating point want to stay there as 
> well (invisible coercions being more likely to cause pain than relieve 
> pain).

Further to what Raymond says, if anyone wants to persue this further, 
and wants to argue for such automatic promotion of float to Decimal (or 
vice versa), I think a good place to start would be a survey of other 
languages with a numeric tower. How do they handle similar situations?


-- 
Steve
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to