Files
Pyarmor-Static-Unpack-1shot/tests/input/test_with.py

32 lines
532 B
Python
Raw Normal View History

2012-06-09 16:45:37 -07:00
with open(__file__):
result = True
2012-06-03 20:39:45 -07:00
with open(__file__) as f:
f.read()
2012-06-09 16:45:37 -07:00
with open(__file__) as f:
s = f.readline()
while s:
s = f.readline()
with open(__file__) as f:
result = False
data = f.read()
if data:
result = True
else:
data = "empty"
with open(__file__) as f:
result = None
try:
data = f.read()
if data:
result = data
else:
result = ""
except:
result = "exception"
2012-06-03 20:39:45 -07:00
else:
2012-06-09 16:45:37 -07:00
result += "\n"