Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #49077
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.013 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; '"this': 0.03; 'subject:code': 0.07; 'cc:addr:python-list': 0.11; 'def': 0.12; '*never*': 0.16; 'closures': 0.16; 'false:': 0.16; 'problem!': 0.16; 'subject: \n ': 0.16; 'subject:variable': 0.16; 'pfxlen:0': 0.19; "python's": 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; '(this': 0.29; 'message- id:@mail.gmail.com': 0.30; 'could': 0.34; 'subject:with': 0.35; 'test': 0.35; 'received:google.com': 0.35; 'little': 0.38; 'sure': 0.39; 'most': 0.60; 'to:addr:gmail.com': 0.65; 'subject:this': 0.83; 'confusing': 0.84; 'subject:before': 0.84 |
| 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=Xs/PbUL07Rs/fuKJvEawQX9HIZqf7DxG7Y793BAbsaw=; b=EAQZ2z7M+OL7tDmDXooObObh/mr/Ovu80ChsH3MN70kGtJ1Sq+1qkX8YVoWzaxn8NF yqG677AwNgkT/1XT6dcccF5PQBLvVO7GIsaHOKQRCTmgyhk3kAQGC9/m25765teNHKbf UxW8htuQIzbDh6/W+sdOx4tW1ZW3LUSrXdhnKDSocLHnZIAU3qbOL3IP0Oxoz6ZWrTqb V+0xLh3cI8XSRNxrmonEVDimasDMGwwwTsAizquJ9EhL8Z8NPPl/sneQVg9zow0rNO5z H2bST4ixuO96iM5wxbJrqz64TpDun493f2/Wq2h0wZQ8dMOYN/IoyrL0fY93Z675WTc+ GaQA== |
| X-Received | by 10.152.4.232 with SMTP id n8mr12300457lan.29.1372105181741; Mon, 24 Jun 2013 13:19:41 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <b3d3518a-f24a-4c32-a41a-b99145753528@googlegroups.com> |
| References | <b3d3518a-f24a-4c32-a41a-b99145753528@googlegroups.com> |
| From | Joshua Landau <joshua.landau.ws@gmail.com> |
| Date | Mon, 24 Jun 2013 21:19:01 +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.3762.1372105516.3114.python-list@python.org> (permalink) |
| Lines | 13 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1372105516 news.xs4all.nl 15985 [2001:888:2000:d::a6]:45723 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:49077 |
Show key headers only | View raw
Here's a little test to make sure you understand (this is one of the
most confusing parts of Python's closures in my opinion):
foo = "I'm foo!"
def working():
print(foo)
def broken():
print(foo)
if False: # There's no way this could cause a problem!
foo = "This will *never* happen"
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll 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