Change array to tuple
Change possible_levels to a tuple. Arrays are mutable, but we never want to mutate this value, so changing it to a tuple reduces the risk of accidentally mutating it. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
This commit is contained in:
parent
6f513af900
commit
4d589859dc
|
@ -2013,7 +2013,8 @@ def show_final_results():
|
|||
count = 0
|
||||
count_per_level = {}
|
||||
count_per_level_and_up = {}
|
||||
possible_levels = [0, 1, 2, 3, 4, 5] # Eliminate dependency on range
|
||||
# Name levels directly, to avoid Python "range" (a Python 2/3 difference)
|
||||
possible_levels = (0, 1, 2, 3, 4, 5)
|
||||
for i in possible_levels: # Initialize count_per_level
|
||||
count_per_level[i] = 0
|
||||
for i in possible_levels: # Initialize count_per_level
|
||||
|
|
Loading…
Reference in New Issue