On 20 March 2010 04:20, Nick Coghlan <ncogh...@gmail.com> wrote:
> In the case of floats and Decimals, there's no ambiguity here that
> creates any temptation to guess - to determine a true/false result for a
> comparison, floats can be converted explicitly to Decimals without any
> loss of accuracy. For Fractions, the precedent has already been set by
> allowing implicit (potentially lossy) conversion to binary floats - a
> lossy conversion to Decimal wouldn't be any worse.

Hmm, given that a float can be converted losslessly to a fraction, why
was the decision taken to convert the fraction to a float rather than
the other way round?

I don't see a PEP for the fractions module, and my google-fu has
failed to find anything. Was there a discussion on this?

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

Reply via email to