Lee Newberg <git...@quantconsulting.com> added the comment:

> The 12 semitones in an octave are separated ...

Right, this functionality would not solve the semitones / cents problem.  Nor 
will it achieve world peace.  But if it solves enough use cases then it is 
worth discussing, yes?

I haven't written the string parsing, but once we know that "0.001" means to 
look in [0.0005, 0.0015) then we can invoke the attached as 
best_fraction(Fraction("0.001"), Fraction("0.0005"), Fraction("0.0015")) to get 
the output Fraction(1, 1000).

----------
Added file: https://bugs.python.org/file50627/best_fraction.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46780>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to