Quote (carteblanche @ 24 May 2014 16:53)
for what value of i and j is it failing, and what are the lengths of both arrays respectively? is it always failing at the same time?
yes
while z < lLength: #I never exit that loop
and this is what I get in ltry -->
Code
[]
####################### while z < lLength: LOOP with break points#########################
Code
while z < lLength:
brcolorwplace2, rcolrplace2 = 0, 0
sortloop = 0
del lTry2[:]
lTry2 = lTry[:]
del lelem [:]
lelem = totall[z]
print ("test 0")
print (lTry)
print (lTry2)
print (totall[z])
print (lelem)
while x <len(lelem):
if lTry2[x] == lelem[x]:
lTry2.pop(x)
lelem.pop(x)
rcolrplace2 = rcolrplace2 +1
else:
x = x + 1
i, j = 0, 0
print ("test 1")
print (lTry)
print (lTry2)
print (totall[z])
print (lelem)
while j <len(lelem):
while i <len(lelem) and sortloop == 0:
if lTry2[i] == lelem[j]: #--------------------------------------getting index out of range--------------------------------------------------just there
lTry2.pop(i)
lelem.pop(j)
rcolorwplace2 = rcolorwplace2 + 1
sortloop = 1
else:
i = i +1
i = 0
sortloop = 0
j = j + 1
if rcolrplace != rcolrplace2 or rcolorwplace != rcolorwplace2:
del totall[z]
z = z - 1
lLength = lLength - 1
z = z + 1
##############################DEBUG########################
[CODE
test 0
[7, 3, 3, 1, 0]#lTry
[7, 3, 3, 1, 0]#lTry2
[7, 3, 3, 0, 7]#totall[z]
[7, 3, 3, 0, 7]#lelem
]test 1
[7, 3, 3, 1, 0] #lTry
[7, 3, 3, 1, 0] #lTry2
[7, 3, 3, 0, 7] #totall[z]
[7, 3, 3, 0, 7] #lelem
test 0
[7, 3, 3, 1, 0] #lTry
[7, 3, 3, 1, 0] #lTry2
[7, 3, 3, 1, 0] #totall[z]
[7, 3, 3, 1, 0] #lelem
test 1
[7, 3, 3, 1, 0] #lTry
[7, 3, 3, 1, 0] #lTry2
[7, 3, 3, 1, 0] #totall[z]
[7, 3, 3, 1, 0] #lelem
test 0
[] #lTry
[3, 1] #lTry2
[7, 3, 3, 1, 1] #totall[z]
[7, 3, 3, 1, 1] #lelem
test 1
[] #lTry
[3, 1] #lTry2
[7, 3, 3, 1, 1] #totall[z]
[7, 3, 3, 1, 1] #lelem[/CODE]
This post was edited by eric838 on May 24 2014 04:29pm