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


Groups > comp.lang.python > #34692 > unrolled thread

Re: Error .. Please Help

Started byChris Angelico <rosuav@gmail.com>
First post2012-12-13 02:05 +1100
Last post2012-12-13 02:05 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Error .. Please Help Chris Angelico <rosuav@gmail.com> - 2012-12-13 02:05 +1100

#34692 — Re: Error .. Please Help

FromChris Angelico <rosuav@gmail.com>
Date2012-12-13 02:05 +1100
SubjectRe: Error .. Please Help
Message-ID<mailman.777.1355324742.29569.python-list@python.org>
On Thu, Dec 13, 2012 at 2:00 AM, inshu chauhan <insideshoes@gmail.com> 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web