Kaydet (Commit) 2b6c2faa authored tarafından Guido van Rossum's avatar Guido van Rossum

Rewrite without using try-except to break out of two loops.

üst 870d5c67
......@@ -5,8 +5,8 @@ if __name__ == '__main__':
verbose = 1
maps = nis.maps()
try:
for nismap in maps:
done = 0
for nismap in maps:
if verbose:
print nismap
mapping = nis.cat(nismap)
......@@ -20,6 +20,7 @@ try:
else:
# just test the one key, otherwise this test could take a
# very long time
raise 'done'
except 'done':
pass
done = 1
break
if done:
break
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment