sys.exit()

Gerrit Holl gerrit at nl.linux.org
Thu Oct 9 14:44:55 EDT 2003


Ivan Voras wrote:
> Gerrit Holl wrote:
> > An alternative that I often choose is:
> >
> > raise SystemExit("I need arguments!")
> >
> > This is the same in one line, and I think it is more elegant, because
> > it
> > is higher-level: you are not using the low-level interface of error
> 
> Yes, I agree. This is what I was looking for (as always, it was obvious
> :) ), thanks. Only, what error code is returned for this termination method?

For a string, I believe it is 1, although I don't know when this holds and
when it doesn't - I don't care for myself, so I never tried to find out, really ;)

Gerrit.

-- 
258. If any one hire an ox-driver, he shall pay him six gur of corn per
year.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
	http://www.sp.nl/





More information about the Python-list mailing list