sys.exit(1) vs raise SystemExit vs raise

Chris Angelico rosuav at gmail.com
Sat Apr 16 03:08:43 EDT 2016


On Sat, Apr 16, 2016 at 4:56 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Stephen Hansen <me at ixokai.io> writes:
>
>> > * You can use named constants from ‘os’ for the purpose of specifying
>> >   exit status numbers.
>>
>> Only on *nix.
>
> Hmm, I didn't see that. It seems strange that even the constant for “no
> error” exit status should be defined only for Unix :-/

Maybe it's an error to use anything non-Unix??

ChrisA



More information about the Python-list mailing list