diff options
Diffstat (limited to 'Demo/classes')
-rwxr-xr-x | Demo/classes/Rat.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Demo/classes/Rat.py b/Demo/classes/Rat.py index 4fc4a17..9e0c05d 100755 --- a/Demo/classes/Rat.py +++ b/Demo/classes/Rat.py @@ -301,7 +301,12 @@ def test(): print complex(i) print for j in list: - print i + j, i - j, i * j, i / j, i ** j, cmp(i, j) + print i + j, i - j, i * j, i / j, i ** j, + if not (isinstance(i, ComplexType) or + isinstance(j, ComplexType)): + print cmp(i, j) + print + if __name__ == '__main__': test() |