Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:code': 0.07; 'cc:addr:python-list': 0.11; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'germane': 0.16; 'subject:python': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'error': 0.23; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'assert': 0.31; "d'aprano": 0.31; 'piece': 0.31; 'steven': 0.31; 'checking': 0.33; 'maybe': 0.34; 'received:google.com': 0.35; 'doing': 0.36; 'should': 0.36; 'pm,': 0.38; 'little': 0.38; "you're": 0.61; 'strategies': 0.77; 'to:none': 0.92; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=tJ0Q2/D9nc/NuOcrrqenOF8oyQibcm8/lIBAFFwTltY=; b=uiIbpbf1OzYOPaFo2cHKM+bd5ZnCrSiNCRPMPs210UDZMEW+pQubU0abbgL3/JibY8 Dt8qzhf7luTFbmCsKwAERkziPuGxXlo7uvo8JR7RUXevUT1bn9R8jH7fgf1oG+SD9nGq xsf0qIEYJzpH2rWbfg/SuOopQAwJ5XPlxafnOZ2q/ln7eOSxGs4XYgcwovYqtm/4UNLp 7i5GSFdOSod/2eg//3Pmy7TiBJhjzDk7A68bF2b1zcOKl2SSIUNFcFeqUzaETCTZ4FcO zUSVApC+WLH7Vv8tu3LG+wPa6sEmK35xvmWvgXdQuJNBfA/E0unT/0oJyynm3/4I9ZS+ FYqA== MIME-Version: 1.0 X-Received: by 10.66.160.2 with SMTP id xg2mr22982643pab.23.1387768170992; Sun, 22 Dec 2013 19:09:30 -0800 (PST) In-Reply-To: <52b7a0e4$0$29994$c3e8da3$5496439d@news.astraweb.com> References: <52b782db$0$6599$c3e8da3$5496439d@news.astraweb.com> <52b7a0e4$0$29994$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 23 Dec 2013 14:09:30 +1100 Subject: Re: cascading python executions only if return code is 0 From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387768642 news.xs4all.nl 2855 [2001:888:2000:d::a6]:56805 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62580 On Mon, Dec 23, 2013 at 1:33 PM, Steven D'Aprano wrote: > Anyway, I may be completely misinterpreting what I'm reading. Perhaps the > assertion is checking a function invariant ("one of the strategies will > always succeed") in which case you're doing it exactly right and I should > shut up now :-) Or maybe it has a lengthy piece of error trapping code that wasn't germane to the discussion, and for brevity was squished down to a quick little assert :) ChrisA