This commit is contained in:
David Halter
2012-04-24 17:24:51 +02:00
parent 470e52e95d
commit 1e7680ed1d
5 changed files with 56 additions and 9 deletions

View File

@@ -1,7 +1,31 @@
# -----------------
# for loops
# -----------------
for a in [1,2]:
#? ['real']
a.real
for a1 in 1,"":
#? ['real']
a1.real
#? ['upper']
a1.upper
for a3, b3 in (1,""), (1,""):
#? ['real']
a3.real
#? []
a3.upper
#? []
b3.real
#? ['upper']
b3.upper
# -----------------
# with statements
# -----------------
with open('') as f:
#? ['closed']
f.closed
@@ -13,6 +37,10 @@ with open('') as f1, open('') as f2:
f2.closed
# -----------------
# global vars
# -----------------
def global_define():
global glob
glob = 3