2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

Add some numeric tests

[SVN r7984]
This commit is contained in:
Dave Abrahams
2000-10-18 00:55:49 +00:00
parent af426418f3
commit 162af7c055

View File

@@ -264,6 +264,18 @@ Sequence tests:
>>> map(lambda x:x, Range(3, 10)[0:4])
[3, 4, 5, 6]
Numeric tests:
>>> x = Rational(2,3)
>>> y = Rational(1,4)
>>> print x + y
11/12
>>> print x - y
5/12
>>> print x * y
1/6
>>> print x / y
8/3
delete non-existent attribute:
del m.foobar
Traceback (innermost last):
@@ -412,6 +424,7 @@ Testing __call__:
0
>>> comparator(couple2, couple)
1
'''
from demo import *