Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'elif': 0.04; 'clause': 0.07; 'subject:Error': 0.07; 'subject:Help': 0.10; 'dec': 0.15; '0.0,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'import': 0.21; 'color,': 0.22; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'block,': 0.29; 'code': 0.31; 'print': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'subject:Please': 0.36; 'ones': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'color': 0.69 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:to :content-type; bh=s32g8ewu6LnuauAFEuEVi1QiSyNjI234Hdf53nAIYvM=; b=LaINp0eLxD+GlGAnUgnBJwUXv/fTfn9p7HzphfXxXJ8db1QKmB97icTZ34KAPRA24I QITuJ1ucODdsBRj40hthfecRtLcGTXwiAKDuSydLqt3cTRF66PNONBILAEqeD8qcQrUN f/FbXTpSVgNGAz0AGFZj+SSIpGDW2nd9YWSfhU9nkwVjdxBJbsUqMhXzd5B3fcjGH7k9 rCEnp5HU85Z5Rni6RAYps+r32inLVBDflA6pkbnRLYwlm9DwDtoU0yz0d+ridUie2PDx NSKh9cleaNJBRmx+ZGhKGB2EgDNDxcCUzcBnLEhBthKVThHKjAUWjCLnWU6sVIV9wdds c+dA== MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 13 Dec 2012 02:05:39 +1100 Subject: Re: Error .. Please Help From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355324742 news.xs4all.nl 6923 [2001:888:2000:d::a6]:60821 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34692 On Thu, Dec 13, 2012 at 2:00 AM, inshu chauhan wrote: > In this code : > > import cv > if color == (0.0,255.0,0.0): > classification = 1 > ... > elif color == (255.0, 0.0, 255.0): > classification = 7 > > print >> g, x , y , color, classification > What happens if the color isn't one of the ones you picked? You may need an 'else' clause on your if/elif/elif block, and some classification value meaning "other". ChrisA