This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Ramchandra Apte, joncle, mark.dickinson, rhettinger, skrah
Date 2012-06-22.13:34:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340372069.17.0.556206091565.issue15136@psf.upfronthosting.co.za>
In-reply-to
Content
BTW, the StackOverflow question helped me understand the use-case here:

  http://stackoverflow.com/q/11154954/270986

The perspective is that of a *Fraction* user who wants to be able to easily see the Decimal expansion of a Fraction to an arbitrary number of decimal places.  (I was trying to understand why a *Decimal* user would care about converting from Fraction instances, but that's the wrong way around.)

That desire to have an easy way to see the digits of a Fraction seems reasonable to me, but I'm not sure that having a Decimal method is the right way to go about it.  Another possible solution would be to implement a decent __format__ method for Fraction, so that somebody could do:

>>> format(Fraction(1, 7), '.17g')
>>> '0.14285714285714286'
History
Date User Action Args
2012-06-22 13:34:29mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, skrah, joncle, Ramchandra Apte
2012-06-22 13:34:29mark.dickinsonsetmessageid: <1340372069.17.0.556206091565.issue15136@psf.upfronthosting.co.za>
2012-06-22 13:34:28mark.dickinsonlinkissue15136 messages
2012-06-22 13:34:28mark.dickinsoncreate