Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.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.062 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'subject:code': 0.07; 'cc:addr:python-list': 0.11; 'fine.': 0.16; 'globals': 0.16; 'silly': 0.16; 'subject: \n ': 0.16; 'subject:variable': 0.16; 'do,': 0.16; 'wrote:': 0.18; 'normally': 0.19; 'pfxlen:0': 0.19; 'cc:addr:python.org': 0.22; 'fine': 0.24; 'cc:2**0': 0.24; 'header :In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'this.': 0.32; 'probably': 0.32; 'another': 0.32; 'worked': 0.33; 'subject:with': 0.35; 'something': 0.35; 'received:google.com': 0.35; "i'll": 0.36; 'question,': 0.38; 'bad': 0.39; "you're": 0.61; 'back': 0.62; 'soon': 0.63; 'to:addr:gmail.com': 0.65; 'subject:this': 0.83; 'all!': 0.84; 'subject:before': 0.84; '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:from:date:message-id:subject:to :cc:content-type; bh=Yj2/0FFPpJWGN3ltFmikD7jrsWRRZQPW6ufhJ5m2gBA=; b=XiMd/AGyjMjhbEdvx1RQVm2Ury9kB3grez4s8FaZvLlKkG1RP8xsCi8XtR1NrxSHhm PycoY4+ds6WPfYpTNFBSJHuDzyLjPxP/IpvDmStlwjBwtMGIkgvOLz8dnIvJdps+bt/w lZoWtobFYEG6qiCzUSY30GNm3a0KTgb6tvCQhEdESFLbaA2ipJh7IQz8rbGT0vVeuUEh S5UdWuEq4OVy1oZaxyGGBeCpkVclUH/eeHI/2v4ZxQPTOviQraYi75LvdhA9ZwruYAwH /VnFaKGtZW0KuGgGu+27uCAsItI0XRbpmy5v0qO2UB6q0lBZZ5MYdGakiSdl+8Db/bI5 f7fg== X-Received: by 10.112.170.166 with SMTP id an6mr13753670lbc.22.1372106029277; Mon, 24 Jun 2013 13:33:49 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <3dc29fa9-cd6d-4150-a76f-d215d7a4192e@googlegroups.com> References: <3dc29fa9-cd6d-4150-a76f-d215d7a4192e@googlegroups.com> From: Joshua Landau Date: Mon, 24 Jun 2013 21:33:09 +0100 Subject: Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) To: pablobarhamalzas@gmail.com Content-Type: text/plain; charset=UTF-8 Cc: python-list 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: 8 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372106494 news.xs4all.nl 16004 [2001:888:2000:d::a6]:59143 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49080 On 24 June 2013 21:19, wrote: > Thank's to you all! > > Setting isWhite as global worked fine. > I'll probably be back soon with another silly question, see you then :) By the way, it's normally bad to use globals like this. When you're learning it's something you just do, though; it's fine for now.