File: trace.right

package info (click to toggle)
pydb 1.19-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,952 kB
  • ctags: 1,412
  • sloc: python: 3,065; perl: 2,479; sh: 586; makefile: 555; lisp: 265; ansic: 16
file content (122 lines) | stat: -rw-r--r-- 2,531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
(hanoi.py:2): 
+ """Towers of Hanoi"""
(hanoi.py:3): 
+ import sys
(hanoi.py:5): 
+ def hanoi(n,a,b,c):
(hanoi.py:12): 
+ if __name__=='__main__':
(hanoi.py:13): 
+     i_args=len(sys.argv)
(hanoi.py:14): 
+     if i_args != 1 and i_args != 2:
(hanoi.py:18): 
+     n=3
(hanoi.py:20): 
+     if i_args > 1:
(hanoi.py:27): 
+     if n < 1 or n > 100: 
(hanoi.py:31): 
+     hanoi(n, "a", "b", "c")
--Call--
(hanoi.py:5):  hanoi
+ def hanoi(n,a,b,c):
(hanoi.py:6):  hanoi
+     if n-1 > 0:
(hanoi.py:7):  hanoi
+        hanoi(n-1, a, c, b) 
--Call--
(hanoi.py:5):  hanoi
+ def hanoi(n,a,b,c):
(hanoi.py:6):  hanoi
+     if n-1 > 0:
(hanoi.py:7):  hanoi
+        hanoi(n-1, a, c, b) 
--Call--
(hanoi.py:5):  hanoi
+ def hanoi(n,a,b,c):
(hanoi.py:6):  hanoi
+     if n-1 > 0:
(hanoi.py:8):  hanoi
+     print "Move disk %s to %s" % (a, b)
(hanoi.py:9):  hanoi
+     if n-1 > 0:
--Return--
(hanoi.py:9):  hanoi
+     if n-1 > 0:
(hanoi.py:8):  hanoi
+     print "Move disk %s to %s" % (a, b)
(hanoi.py:9):  hanoi
+     if n-1 > 0:
(hanoi.py:10):  hanoi
+        hanoi(n-1, c, b, a) 
--Call--
(hanoi.py:5):  hanoi
+ def hanoi(n,a,b,c):
(hanoi.py:6):  hanoi
+     if n-1 > 0:
(hanoi.py:8):  hanoi
+     print "Move disk %s to %s" % (a, b)
(hanoi.py:9):  hanoi
+     if n-1 > 0:
--Return--
(hanoi.py:9):  hanoi
+     if n-1 > 0:
--Return--
(hanoi.py:10):  hanoi
+        hanoi(n-1, c, b, a) 
(hanoi.py:8):  hanoi
+     print "Move disk %s to %s" % (a, b)
(hanoi.py:9):  hanoi
+     if n-1 > 0:
(hanoi.py:10):  hanoi
+        hanoi(n-1, c, b, a) 
--Call--
(hanoi.py:5):  hanoi
+ def hanoi(n,a,b,c):
(hanoi.py:6):  hanoi
+     if n-1 > 0:
(hanoi.py:7):  hanoi
+        hanoi(n-1, a, c, b) 
--Call--
(hanoi.py:5):  hanoi
+ def hanoi(n,a,b,c):
(hanoi.py:6):  hanoi
+     if n-1 > 0:
(hanoi.py:8):  hanoi
+     print "Move disk %s to %s" % (a, b)
(hanoi.py:9):  hanoi
+     if n-1 > 0:
--Return--
(hanoi.py:9):  hanoi
+     if n-1 > 0:
(hanoi.py:8):  hanoi
+     print "Move disk %s to %s" % (a, b)
(hanoi.py:9):  hanoi
+     if n-1 > 0:
(hanoi.py:10):  hanoi
+        hanoi(n-1, c, b, a) 
--Call--
(hanoi.py:5):  hanoi
+ def hanoi(n,a,b,c):
(hanoi.py:6):  hanoi
+     if n-1 > 0:
(hanoi.py:8):  hanoi
+     print "Move disk %s to %s" % (a, b)
(hanoi.py:9):  hanoi
+     if n-1 > 0:
--Return--
(hanoi.py:9):  hanoi
+     if n-1 > 0:
--Return--
(hanoi.py:10):  hanoi
+        hanoi(n-1, c, b, a) 
--Return--
(hanoi.py:10):  hanoi
+        hanoi(n-1, c, b, a) 
--Return--
(hanoi.py:31): 
+     hanoi(n, "a", "b", "c")
--Return--
(<string>:1): 
+