Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.130 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.81; '*S*': 0.07; 'subject:code': 0.07; 'cc:addr:python-list': 0.11; 'wrote': 0.14; 'mostly': 0.14; '"user': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'roy': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; 'went': 0.31; 'assert': 0.31; 'fri,': 0.33; 'one,': 0.35; 'received:google.com': 0.35; 'list.': 0.37; 'pm,': 0.38; 'changed': 0.39; 'how': 0.40; 'high': 0.63; 'smith': 0.68; 'article': 0.77; '"can': 0.84; 'ethan': 0.84; 'furman': 0.84; 'to:none': 0.92; 'confidence': 0.95; '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=G1dGSx/D+tWu60bpxz09g53jTY62yZpp2m7BI/0RYj8=; b=xMjS83bMESCpagagZhaNkuZABH2B7zFi6HjM33U3C+4gjzCOOLo57xOBnEpvB8fO7p sgAp0BtACLU843MSfx5UohEsFRWnBy9nese21BSEWAzHfigoR13BHCSn36jWqsaZVQR5 P4DYmE3H0+VxykFY1oStObEPK0G+/O1hEX0s5v4oZNvnHfllm0Az9QyWU0BFwR8nBUmv nHJJErHi3ntYURVzKMTgYRx+l/tecmEgUswCqOffKI02FFbzWXoYfHBnJBJjZGkjr06r KXIIvRcNHcg5JeeYrrE8dohGpwervU16u4cLK8Wf/0I/I+G3pVrUK+bvmKZV3FXHXdJl bXjQ== MIME-Version: 1.0 X-Received: by 10.68.245.4 with SMTP id xk4mr6881717pbc.153.1388108675472; Thu, 26 Dec 2013 17:44:35 -0800 (PST) In-Reply-To: References: <52b782db$0$6599$c3e8da3$5496439d@news.astraweb.com> <52b7a0e4$0$29994$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 27 Dec 2013 12:44:35 +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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388108992 news.xs4all.nl 2904 [2001:888:2000:d::a6]:33866 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62761 On Fri, Dec 27, 2013 at 12:37 PM, Roy Smith wrote: > In article , > Ethan Furman wrote: > >> Mostly I don't want newbies thinking "Hey! I can use assertions for all my >> confidence testing!" > > How about this one, that I wrote yesterday; > > assert second >= self.current_second, "time went backwards" > > I think that's pretty high up on the "can never happen" list. assert second >= self.current_second, "user changed the clock" ChrisA