~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/fractions.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
        Fraction(22, 7)
149
149
        >>> Fraction('3.141592653589793').limit_denominator(100)
150
150
        Fraction(311, 99)
151
 
        >>> Fraction(1234, 5678).limit_denominator(10000)
152
 
        Fraction(1234, 5678)
 
151
        >>> Fraction(4321, 8765).limit_denominator(10000)
 
152
        Fraction(4321, 8765)
153
153
 
154
154
        """
155
155
        # Algorithm notes: For any real number x, define a *best upper