[Python-ideas] Python Numbers as Human Concept Decimal System

Ned Deily nad at acm.org
Sat Mar 8 03:51:35 CET 2014


In article 
<CAP7+vJKFYy+RGbryMSWzXaExZajL1zUTmiWPdnPeG5RpkmRHiw at mail.gmail.com>,
 Guido van Rossum <guido at python.org> 
 wrote:
> On Fri, Mar 7, 2014 at 6:10 PM, Chris Angelico 
> <rosuav at gmail.com> wrote:
> > If that's the definition of a float's repr, then I'd support using
> > that by default for the construction of a Decimal from a float. You
> > can always use .as_integer_ratio() to get the exact stored
> > representation.
> Sadly I can't point to exactly where this is documented, but since Python
> 2.7 and some early version of 3.x that is indeed how repr(<float>) works.

If nowhere else:

http://docs.python.org/3/whatsnew/3.1.html#other-language-changes
http://bugs.python.org/issue1580

http://docs.python.org/2/whatsnew/2.7.html#other-language-changes
http://bugs.python.org/issue7117

-- 
 Ned Deily,
 nad at acm.org



More information about the Python-ideas mailing list