sys.exit versus raise SystemExit

Will McGugan will at
Mon Jan 8 18:27:28 CET 2007

wittempj at wrote:
> sys.exit() raises a SystemExit, see
Oh I know. I was just wondering if there was some sort of subtle 'best 
practice' recommendation that I wasnt aware of for using sys.exit over 
raising the exception manually. In the same way that 'open' is prefered 
over 'file', even though they appear to do the same thing.


More information about the Python-list mailing list