Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Stephen Hansen Newsgroups: comp.lang.python Subject: Re: sys.exit(1) vs raise SystemExit vs raise Date: Fri, 15 Apr 2016 22:34:32 -0700 Lines: 13 Message-ID: References: <20160416034833.GA24653@cskk.homeip.net> <858u0ew5qg.fsf@benfinney.id.au> <1460784872.1843058.580428001.63445E11@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de NbwnCmbGxYeFwqccu4i9BQZ/CU6Esv5AYIhc1+Q+mcYQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(even': 0.05; 'exit': 0.07; 'received:internal': 0.09; 'specifying': 0.09; '--s': 0.16; 'constants': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'varies': 0.16; 'header:In-Reply-To:1': 0.24; 'directly,': 0.29; 'windows,': 0.29; "i'd": 0.31; 'subject:) ': 0.32; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'where': 0.40; 'header:Message-Id:1': 0.61 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=ixokai.io; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=CwdX/uJE84NZQCQpR0KCB18lOaY=; b=TUXT5U pYvch5CAu6NuvZqnzNWLcOdaC4vH3Dw8djPUJhCNiNw9CjntY7mWbx7x3Db+HYMr +DK/C5vxE0dnH4eq6AycNg/lkp+vAupYilwKyJWxiE45Mdtr/ADIEQQyTXXPgpdU /S/PvVqFX3I92uXj0UxPdxibAinnJ8Jfu0RRw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=CwdX/uJE84NZQCQ pR0KCB18lOaY=; b=GbOHFQYwrjXpLnjf4c8eauWpCpLPfZRo7awdyznk/CxB6Pg KTyXk5QbROkIzuDmqrn6DbHDhOxxScnq4YUs0mNziqgiVhhjbHEmvOjKCi+Tmq0F eLrmO3GDdirqr5T3tIOaTI/bMPx0sZnBqFmuufbhflHjhV/zTP70qbDpdUbY= X-Sasl-Enc: L2Q9sihvvFFoXHebts2CcwyAL8m1HamFV5KKoL33rHzH 1460784872 X-Mailer: MessagingEngine.com Webmail Interface - ajax-1032a755 In-Reply-To: <858u0ew5qg.fsf@benfinney.id.au> X-Mailman-Approved-At: Sat, 16 Apr 2016 02:02:39 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1460784872.1843058.580428001.63445E11@webmail.messagingengine.com> X-Mailman-Original-References: <20160416034833.GA24653@cskk.homeip.net> <858u0ew5qg.fsf@benfinney.id.au> Xref: csiph.com comp.lang.python:107079 > * You can use named constants from =E2=80=98os=E2=80=99 for the purpose o= f specifying > exit status numbers. Only on *nix.=20 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