Mark Dickinson added the comment:

(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.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1682>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to