Author mark.dickinson
Recipients facundobatista, gvanrossum, jyasskin, mark.dickinson, rhettinger
Date 2008-01-19.01:59:30
SpamBayes Score 0.052401
Marked as misclassified No
Message-id <1200707975.18.0.845269424358.issue1682@psf.upfronthosting.co.za>
In-reply-to
Content
(About the latest patch):  this all looks good to me.

The comment that "Decimal provides no other public way to detect nan and infinity." is not 
true (though it once was).  Decimal has public methods is_nan and is_infinite, added as 
part of updating to the most recent specification.  (Yes, it also has private methods 
_isnan and _isinfinity, dating from long ago;  I'm working on a patch that gets rid of the 
duplication.)

(About the approximation methods):  I agree that these aren't a necessary part of a 
Rational module---just something that might be nice to have around.  So my vote would be 
for adding either 0 or 1 of these;  adding two such similar methods with similar use-cases 
just seems like a cause of possible confusion to me.  I'd also vote against a method for 
providing the convergents of the continued-fraction, but that's just me.  See what python-
dev says!

One interesting use-case for approximate is to recover a simple rational from a float, in 
a case where the float was rational to begin with, but lost a little accuracy in 
conversion;  approximate works well here because you generally have some idea how close 
the float is to the rational.
History
Date User Action Args
2008-01-19 01:59:37mark.dickinsonsetspambayes_score: 0.052401 -> 0.052401
recipients: + mark.dickinson, gvanrossum, rhettinger, facundobatista, jyasskin
2008-01-19 01:59:35mark.dickinsonsetspambayes_score: 0.052401 -> 0.052401
messageid: <1200707975.18.0.845269424358.issue1682@psf.upfronthosting.co.za>
2008-01-19 01:59:33mark.dickinsonlinkissue1682 messages
2008-01-19 01:59:31mark.dickinsoncreate