In article <CAP7+vJKFYy+RGbryMSWzXaExZajL1zUTmiWPdnPeG5RpkmRHiw@mail.gmail.com>, Guido van Rossum <guido@python.org> wrote:
On Fri, Mar 7, 2014 at 6:10 PM, Chris Angelico <rosuav@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@acm.org