Home | History | Annotate | Download | only in test

Lines Matching refs:den

33     def __init__(self, num=0L, den=1L):
34 """Constructor: Rat([num[, den]]).
39 if not isint(den):
40 raise TypeError, "Rat denominator must be int or long (%r)" % den
42 if den == 0:
44 g = gcd(den, num)
46 self.__den = long(den//g)
54 """Accessor function for read-only 'den' attribute of Rat."""
56 den = property(_get_den, None)
71 """Convert a Rat to an int; self.den must be 1."""
81 """Convert a Rat to an long; self.den must be 1."""
234 self.assertEqual(a.den, 3)
237 self.assertEqual(a.den, 3)
240 self.assertEqual(a.den, 3)
243 self.assertEqual(a.den, 3)
246 self.assertEqual(a.den, 3)
249 self.assertEqual(a.den, 1)