
那怎么样才能让finally代码不执行了。
import time
choice = True
try:
if choice:
while True:
pass
else:
print "Please pull the plug on your computer sometime soon..."
time.sleep(60 * 60 * 24 * 365)
finally:
print "Finally ..."上面的代码主要是通过让流程停滞在try作用域里,从而实现了需求。









