I don't get why sys.exit(1) doesn't exit the while loop in the follow case

Ethan Furman ethan at stoneleaf.us
Mon Oct 11 08:42:39 EDT 2010


Lawrence D'Oliveiro wrote:
> In message <pan.2010.10.05.20.44.49.109000 at nowhere.com>, Nobody wrote:
> 
>>If I'm catching exceptions in order to perform clean-up, I'll use a bare
>>except and re-raise the exception afterwards. In that situation, a bare
>>except is usually the right thing to do.
> 
> Wrong way to do it.

What, then, is the right way to do it?

~Ethan~



More information about the Python-list mailing list