On 1/20/08, Paul Moore <[EMAIL PROTECTED]> wrote:
> Both of these are likely to be of limited use. The most common usage I
> know of is to make a "sensible" rational from a float (i.e., a DWIM
> style conversion 0.1 -> 1/10) or to provide readable output. On the
> other hand, both are subtle to implement, so having a standard
> implementation saves people having to code (and debug) their own.
>
> I suspect that simplest within a particular distance is the form that
> is most often wanted, but I don't have any good evidence for that
> feeling. Putting both in might help people to realise that there *is*
> a choice.
>
> Given that you have implemented them, I'd say leave them in. And I
> like the names trim and approximate, as given in the code you
> referenced.

I can't think of a use case for these either, but the first
(limit_denominator) seems like a generalized round, and I suppose
might be useful for something.

-- 
Cheers,
Leif
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to