Use local vars instead of calling len()
This commit is contained in:
parent
3c56abf047
commit
b0a2ce8b22
|
@ -120,7 +120,7 @@ class Layout(Boxes):
|
||||||
self.ctx.save()
|
self.ctx.save()
|
||||||
|
|
||||||
# Horizontal Walls
|
# Horizontal Walls
|
||||||
for y in range(len(self.y) + 1):
|
for y in range(ly + 1):
|
||||||
if y == 0 or y == ly:
|
if y == 0 or y == ly:
|
||||||
h = self.h
|
h = self.h
|
||||||
else:
|
else:
|
||||||
|
@ -160,7 +160,7 @@ class Layout(Boxes):
|
||||||
self.ctx.save()
|
self.ctx.save()
|
||||||
|
|
||||||
# Vertical Walls
|
# Vertical Walls
|
||||||
for x in range(len(self.x) + 1):
|
for x in range(lx + 1):
|
||||||
if x == 0 or x == lx:
|
if x == 0 or x == lx:
|
||||||
h = self.h
|
h = self.h
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue