Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: MRAB Newsgroups: comp.lang.python Subject: Re: Stupid question, just need a quick and dirty fix Date: Fri, 22 Jul 2016 15:58:28 +0100 Lines: 19 Message-ID: References: <927ed464-34fd-8f73-26d0-84b58cc9c4b2@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de h1qoWSuL7hTNfAqbcWJwBQJi6EOni/48o0l4cHXHCraQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'modify': 0.04; 'line:': 0.07; 'works.': 0.07; 'subject:question': 0.08; 'python': 0.10; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'subject:need': 0.18; 'programmer': 0.18; 'purposes': 0.20; 'trying': 0.22; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'looks': 0.29; 'be:': 0.29; 'subset': 0.29; "i'm": 0.30; 'code': 0.30; 'probably': 0.31; 'suit': 0.33; 'false': 0.35; 'filter': 0.35; 'necessary.': 0.35; 'returning': 0.35; 'something': 0.35; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'anything': 0.38; 'means': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'results': 0.66; 'bayless': 0.84; '150': 0.93 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.2 cv=dMLko6Rb c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=IkcTkHD0fZMA:10 a=en1gAxwCHvak-6jmt48A:9 a=c8S1LSykOT_wIf42:21 a=cd31CrQt7EIuc0Mt:21 X-AUTH: mrabarnett@:2500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <927ed464-34fd-8f73-26d0-84b58cc9c4b2@mrabarnett.plus.com> X-Mailman-Original-References: Xref: csiph.com comp.lang.python:111756 On 2016-07-22 05:19, Jordan Bayless wrote: > I'm trying to modify some code to suit my purposes and I'm just trying to filter results as necessary. Basically, the code is returning one of a number from a subset of 150 numbers. I want to only do anything with it if the number is a 'good' one. I'm by no means a Python programmer (C# for me by trade) and I'm not looking for anything that will be distributed..I just want something that works. > > Basically, here's what I'm trying to insert: > > global blnDesiredInd > > blnDesiredInd == False > [snip] The line: blnDesiredInd == False looks wrong. It should probably be: blnDesiredInd = False