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.

classification
Title: Docstring for fractions.Fraction.limit_denominator fails
Type: Stage:
Components: Library (Lib), Tests Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: flox, mark.dickinson
Priority: normal Keywords:

Created on 2009-11-23 11:55 by flox, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg95620 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2009-11-23 11:55
Yes, you can reduce the fraction 1234/5678.
Bad Luck :p

~ $  python3 -m doctest /usr/lib/python3.1/fractions.py
**********************************************************************
File "/usr/lib/python3.1/fractions.py", line 165, in
fractions.Fraction.limit_denominator
Failed example:
    Fraction(1234, 5678).limit_denominator(10000)
Expected:
    Fraction(1234, 5678)
Got:
    Fraction(617, 2839)
**********************************************************************
1 items had failures:
   1 of   3 in fractions.Fraction.limit_denominator
***Test Failed*** 1 failures.
~ $
msg95635 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-11-23 16:29
Thanks for the report!  Fixed in r76456 through r76459.
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51628
2009-11-23 16:29:48mark.dickinsonsetstatus: open -> closed
versions: + Python 2.6, Python 2.7, - Python 3.0
nosy: + mark.dickinson

messages: + msg95635

resolution: fixed
2009-11-23 11:55:06floxcreate