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

Add try-finally around main loop.

üst 20abb4e6
......@@ -52,8 +52,11 @@ class Electrons:
# Run -- never returns
def run(self):
while 1:
self.random_move(self.n)
try:
while 1:
self.random_move(self.n)
finally:
self.tk.destroy()
# Main program
......
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