Correction du bug dans la fonction reference.
This commit is contained in:
parent
910fd6d5bb
commit
44600c0b0e
19
read.py
19
read.py
|
@ -15,19 +15,20 @@ def load(d):
|
||||||
globals()[k]=d[k]
|
globals()[k]=d[k]
|
||||||
|
|
||||||
def reference(var,noms):
|
def reference(var,noms):
|
||||||
sizex=len(var)
|
if len(noms)==2:
|
||||||
if len(noms)==2: sizey=len(var[0])
|
for y in range(len(var)):
|
||||||
for x in range(sizex):
|
for x in range(len(var[y])):
|
||||||
for y in range(sizey):
|
var[y][x][noms[0]]=y
|
||||||
print var[x][y]['level']
|
var[y][x][noms[1]]=x
|
||||||
var[x][y][noms[0]]=x
|
else:
|
||||||
if len(noms)==2: var[x][y][noms[1]]=y
|
for x in range(len(var[y])):
|
||||||
|
var[x][y][noms[0]]=x
|
||||||
|
|
||||||
read("/home/horde/.wirechem/dbdata")
|
read("/home/horde/.wirechem/dbdata")
|
||||||
|
reference(Uworlds,['world','level'])
|
||||||
print Uworlds
|
print Uworlds
|
||||||
print finished
|
print finished
|
||||||
print len(Uworlds[0])
|
print len(Uworlds[0])
|
||||||
reference(Uworlds,['world','level'])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue