Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!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.094 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.01; 'subject:code': 0.07; 'cc:addr:python-list': 0.11; '23,': 0.16; 'cui': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'handling': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'testing': 0.29; 'am,': 0.29; "doesn't": 0.30; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'sense': 0.34; 'advice': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'thanks': 0.36; 'previous': 0.38; 'mentioned': 0.61; 'took': 0.61; 'matter': 0.61; 'you.': 0.62; 'more': 0.64; 'frank': 0.68; 'clearer': 0.84; 'to:none': 0.92; 'rick': 0.93; '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=ZEbFg5q9U/4+RF/mYlqm/KNLM9uOF2qg2ULCZ+3LoJ0=; b=PLdlWLZ80wARCc7aoC0uc6mrkgkp3ivDyMz+shrMZ8b13c8AwFanvgIHNuI9ADc8y3 +SBrk0F+UW5LF/OLK09QYha1yVocOZnN3mYwN4MkfC38z6IPfEDAcviBR8zNikWOG4lH I2hYAdUVbZeIVm0EdAHEdxSvJNVYgxZUzYLNqkBx6dZrtjT48XaOopNdETo/Yc19UFIc iZ6V629keiIYAVnmxECInR3Dxh3ks6j5H267Ulv2/ZvNbjMLYIXDgH5Q0ek7/5eT6FDu 5GKW5ozz07FIaIIlts6lIDWLabPe2klTCjSw+S0tnXVwa8D6ak3yPN2wPrSqdK8V4mJW 7X6w== MIME-Version: 1.0 X-Received: by 10.66.144.40 with SMTP id sj8mr22567905pab.4.1387752716046; Sun, 22 Dec 2013 14:51:56 -0800 (PST) In-Reply-To: References: Date: Mon, 23 Dec 2013 09:51:55 +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: 1387752719 news.xs4all.nl 2898 [2001:888:2000:d::a6]:40836 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62560 On Mon, Dec 23, 2013 at 9:14 AM, Frank Cui wrote: > Thanks for pointing out. I accept your advice and will try to make the > questions clearer and more straightforward to interpretate . I already took > the suggestion of using exception-based handling over the return code. > > As to testing whether the previous function fails or succeeds, this doesn't > really matter in the sense that I already mentioned a return code of 0. Ranting Rick is one of the list's resident trolls. Don't take it amiss that he turned his flamethrowers on you. :) ChrisA