2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-27 07:02:15 +00:00

New example: nested.cpp

[SVN r10946]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-08-28 02:02:27 +00:00
parent 37b6e22321
commit c7f1c5e29c
8 changed files with 109 additions and 2 deletions

23
example/test_nested.py Normal file
View File

@@ -0,0 +1,23 @@
r'''>>> import nested
>>> s = nested.show_nested_tuples(((1,2,3), (4,5,6,7)))
>>> for l in s:
... print l
(0,0) 1
(0,1) 2
(0,2) 3
(1,0) 4
(1,1) 5
(1,2) 6
(1,3) 7
'''
def run(args = None):
if args is not None:
import sys
sys.argv = args
import doctest, test_nested
return doctest.testmod(test_nested)
if __name__ == '__main__':
import sys
sys.exit(run()[0])