Searched refs:Rat (Results 1 - 4 of 4) sorted by relevance

/external/python/cpython2/Lib/test/
H A Dtest_binop.py24 """Test wheter an object is an instance of the Rat class."""
25 return isinstance(x, Rat)
27 class Rat(object): class in inherits:object
34 """Constructor: Rat([num[, den]]).
38 raise TypeError, "Rat numerator must be int or long (%r)" % num
40 raise TypeError, "Rat denominator must be int or long (%r)" % den
49 """Accessor function for read-only 'num' attribute of Rat."""
54 """Accessor function for read-only 'den' attribute of Rat."""
59 """Convert a Rat to a string resembling a Rat constructo
[all...]
H A Dtest_long.py831 class Rat: class in function:LongTest.test_mixed_compares
873 if not isinstance(other, Rat):
874 other = Rat(other)
890 Rx = Rat(x)
892 Ry = Rat(y)
/external/python/cpython3/Lib/test/
H A Dtest_binop.py26 """Test wheter an object is an instance of the Rat class."""
27 return isinstance(x, Rat)
29 class Rat(object): class in inherits:object
36 """Constructor: Rat([num[, den]]).
40 raise TypeError("Rat numerator must be int (%r)" % num)
42 raise TypeError("Rat denominator must be int (%r)" % den)
51 """Accessor function for read-only 'num' attribute of Rat."""
56 """Accessor function for read-only 'den' attribute of Rat."""
61 """Convert a Rat to a string resembling a Rat constructo
[all...]
H A Dtest_long.py537 class Rat: class in function:LongTest.test_mixed_compares
579 if not isinstance(other, Rat):
580 other = Rat(other)
607 Rx = Rat(x)
609 Ry = Rat(y)

Completed in 220 milliseconds