By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,783 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

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

P: n/a
Is this a python bug, or do i not understand
something?

http://www.linuxquestions.org/questi...hreadid=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
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
jim bardin wrote:
Is this a python bug, or do i not understand
something?

http://www.linuxquestions.org/questi...hreadid=336118

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


Your targets contains duplicates - and these produce the problem. And as
print len(all) == len(set(all))

False

shows your alleged " i checked the output of the combination generator
and they're all unique values." is obvously wrong.

Doing this

targets=list(set([97,101,139,41,37,31,29,89,23,19,8,13,131,19,73,97, 19,139,79,67,61,17,113,127]))
as first line solves the problem.
Diez
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.