Skip to content

Commit a044bdd

Browse files
committed
new file
1 parent e783be4 commit a044bdd

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

scope.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python
2+
j, k = 1, 2
3+
4+
def proc1():
5+
6+
j, k = 3, 4
7+
print "j == %d and k == %d" % (j, k)
8+
k = 5
9+
10+
def proc2():
11+
12+
#global j
13+
j = 6
14+
proc1()
15+
print "j == %d and k == %d" % (j, k)
16+
17+
k = 7
18+
proc1()
19+
print "j == %d and k == %d" % (j, k)
20+
21+
j = 8
22+
proc2()
23+
print "j == %d and k == %d" % (j, k)

0 commit comments

Comments
 (0)