Is this a bug? I don't know where to start

2005-06-22 Thread jim bardin
Is this a python bug, or do i not understand
something?

http://www.linuxquestions.org/questions/showthread.php?s=&threadid=336118

It seems to me that this should output each value
once, but i get some seemingly random duplicates.

If it is a bug, what do i file it under. I don't know
what's wrong to cause this.

thanks
jim
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is this a bug? I don't know where to start

2005-06-22 Thread jim bardin
wow. that's too obviouse! 
i've been looking at everything, but i just assumed
the data in the example was ok.

thanks alot
jim

--- Jeff Epler <[EMAIL PROTECTED]> wrote:

> Your list "targets" contains some values twice.
> 
> >>>
>
targets=[97,101,139,41,37,31,29,89,23,19,8,13,131,19,73,97,19,139,79,67,61,17,113,127]
> >>> for t in set(targets):
> ... if targets.count(t) > 1: print t
> ... 
> 97
> 139
> 19
> 
> It looks like the "duplicated" items in the output
> contain one of the
> duplicated items from the input.
> 
> Jeff
> 

-- 
http://mail.python.org/mailman/listinfo/python-list