Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'failing': 0.05; 'subject:adding': 0.07; 'runs,': 0.09; 'cc:addr:python-list': 0.10; 'copytree': 0.16; 'missing,': 0.16; 'skips': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'try/except': 0.16; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'done.': 0.27; 'possibly': 0.27; 'execution': 0.27; 'message- id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'block,': 0.29; "d'aprano": 0.29; 'steven': 0.29; 'ends': 0.30; 'sense': 0.31; 'received:google.com': 0.34; 'thanks': 0.34; 'described': 0.35; 'received:209.85': 0.35; 'except': 0.36; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'header:Received:5': 0.40; 'think': 0.40; 'first': 0.61; 'more': 0.63; 'gave': 0.65; 'subject:mode': 0.84 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:to :cc:content-type; bh=BugEhzLxmYMg8CvqsLXul8OB6IHpOXJpZrV987+EaYw=; b=LnMgoB5rtsNO+DXQxyxNNqDFNdn0LzAYQmvBBCW0827gzn82V5FpYjKwVeCtvIuMfS iYhOg7QioYGpwc3efVD6qhFbEXHpVBBIyskw28mZ8EcWEdFRl24ZzjrnC5xDbEiiaIY9 JqcjG9BgngBLspN8uYkPeKkA/xGPmtmXBUe863NzWct8jVmi4FpHEWE4sUKp9oTW2Gt3 ChGj8kMIdMkUH3GutIDpVt4jCVPHwSMbqEulyeTSkyR55t8Feo7c8t+glQ2C6ScGhvi4 mdidEzmVOebcchuHaEkemDdO0OfO85cLZMztMPJPaD7pxo5pZQo8nVwSj25tRDMbF/G0 kwMQ== MIME-Version: 1.0 In-Reply-To: <4fff89f6$0$29965$c3e8da3$5496439d@news.astraweb.com> References: <87liiyr48f.fsf@handshake.de> <4fff89f6$0$29965$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 13 Jul 2012 09:54:37 +0100 Subject: Re: adding a simulation mode From: andrea crotti To: "Steven D'Aprano" Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 1342169679 news.xs4all.nl 6922 [2001:888:2000:d::a6]:59482 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25254 2012/7/13 Steven D'Aprano : > Well of course it does. If copytree fails, the try block ends and > execution skips straight to the except block, which runs, and then the > program halts because there's nothing else to be done. > > That at least is my guess, based on the described symptoms. > Well I think that's what I was stupidly missing, I always had only one possibly failing thing in a try/except block, and I always gave for granted that it doesn't jump to the except block on first error, but of course it makes more sense if it does... Thanks a lot