1.1 --- a/ula.py Sat Dec 10 22:49:37 2011 +0100
1.2 +++ b/ula.py Sun Dec 11 01:18:22 2011 +0100
1.3 @@ -4,8 +4,6 @@
1.4 Acorn Electron ULA simulation.
1.5 """
1.6
1.7 -import itertools
1.8 -
1.9 WIDTH = 640
1.10 HEIGHT = 512
1.11 INTENSITY = 255
1.12 @@ -283,7 +281,7 @@
1.13
1.14 "Return an array representing the computer's memory."
1.15
1.16 - return list(itertools.repeat(0, MAX_MEMORY))
1.17 + return [0] * MAX_MEMORY
1.18
1.19 def get_screen():
1.20
1.21 @@ -292,12 +290,7 @@
1.22 x = 0
1.23 screen = []
1.24 while x < WIDTH:
1.25 - y = 0
1.26 - column = []
1.27 - while y < HEIGHT:
1.28 - column.append((0, 0, 0))
1.29 - y += 1
1.30 - screen.append(column)
1.31 + screen.append([(0, 0, 0)] * HEIGHT)
1.32 x += 1
1.33 return screen
1.34
1.35 @@ -308,7 +301,6 @@
1.36 i += 1
1.37
1.38 # Test program providing coverage (necessary for compilers like Shedskin).
1.39 -# NOTE: Running this will actually cause an IndexError.
1.40
1.41 if __name__ == "__main__":
1.42 ula = get_ula()