Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107079 > unrolled thread

Re: sys.exit(1) vs raise SystemExit vs raise

Started byStephen Hansen <me@ixokai.io>
First post2016-04-15 22:34 -0700
Last post2016-04-15 22:34 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: sys.exit(1) vs raise SystemExit vs raise Stephen Hansen <me@ixokai.io> - 2016-04-15 22:34 -0700

#107079 — Re: sys.exit(1) vs raise SystemExit vs raise

FromStephen Hansen <me@ixokai.io>
Date2016-04-15 22:34 -0700
SubjectRe: sys.exit(1) vs raise SystemExit vs raise
Message-ID<mailman.38.1460786560.6324.python-list@python.org>
> * You can use named constants from ‘os’ for the purpose of specifying
>   exit status numbers.

Only on *nix. 

Even then it varies from platform to platform which constants you can
use. I'd prefer to document the return status and use numbers/my own
constants directly, that way supporting any platform (even windows,
where its %ERRORLEVEL%

--S

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web