Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'indication': 0.09; 'subject:Why': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; '10:05': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; '31,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'marc': 0.31; 'fri,': 0.33; "can't": 0.35; 'received:google.com': 0.35; 'needed': 0.38; 'pm,': 0.38; 'situation': 0.65; 'subject:this': 0.83; 'believe,': 0.84; 'to:none': 0.92 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=Ax1/4gpQ7LO6GVEmiM1Qwp+sfoGqTUHdVS2KeDg59ac=; b=FX+mJmqeC4Jaa93dTUyKlAwREThidSGYRV/WCJZCIs8vhdPL/tl8XhFagAHfmglldy ju7Nz6Mxy8rkfbZL1qkO6xZzjieJEVMcBC5Q5tdoQvZQETaIWNXvX1y0DRR4poaVI6xa 4GSwMaYOHXoYkLKp89vKvZbmVPi0LEDczOFgbtJBY1KAEuHHeqCoPplNcMEuwyDZBdzP oT7b9H33G6sTawlAS1hKSlyRevfqujXLNc4Cqnu8gqHGDeaE4ScMgVmoTyylxDf7fjSm /lIXJZyqZnH31gdZgW1lkxWuRSMtDf2yTzauNdcVTlYouvWG4YJvdYbtfRQTlSh8BNya PC2Q== MIME-Version: 1.0 X-Received: by 10.66.102.39 with SMTP id fl7mr20585172pab.43.1391175402566; Fri, 31 Jan 2014 05:36:42 -0800 (PST) In-Reply-To: References: Date: Sat, 1 Feb 2014 00:36:42 +1100 Subject: Re: Why this throws an UnboundLocalError ? From: Chris Angelico Cc: "comp.lang.python" 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: 7 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391175410 news.xs4all.nl 2839 [2001:888:2000:d::a6]:33973 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65117 On Fri, Jan 31, 2014 at 10:05 PM, Marc Aymerich wrote: > I can't believe, all these years using Python and never encountered a > situation where I needed to use global ! That might be an indication of good code design :) ChrisA