Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49080

Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment)

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 <joshua.landau.ws@gmail.com>
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 <b3d3518a-f24a-4c32-a41a-b99145753528@googlegroups.com> <3dc29fa9-cd6d-4150-a76f-d215d7a4192e@googlegroups.com>
From Joshua Landau <joshua.landau.ws@gmail.com>
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 <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3766.1372106494.3114.python-list@python.org> (permalink)
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

Show key headers only | View raw


On 24 June 2013 21:19,  <pablobarhamalzas@gmail.com> 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) pablobarhamalzas@gmail.com - 2013-06-24 12:47 -0700
  Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) pablobarhamalzas@gmail.com - 2013-06-24 12:53 -0700
  Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) Peter Otten <__peter__@web.de> - 2013-06-24 22:05 +0200
  Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-06-24 22:10 +0200
  Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) John Gordon <gordon@panix.com> - 2013-06-24 20:12 +0000
    Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-24 21:33 +0100
    Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) Dave Angel <davea@davea.name> - 2013-06-24 16:43 -0400
      Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) John Gordon <gordon@panix.com> - 2013-06-24 21:41 +0000
  Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) pablobarhamalzas@gmail.com - 2013-06-24 13:19 -0700
    Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-24 21:33 +0100
  Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment) Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-24 21:19 +0100

csiph-web