Do not use built-in list variable

This patch changes the ilst built-in variable to l_list.
This commit is contained in:
Rodolfo García Peñas (kix) 2020-10-10 18:59:04 +02:00
parent 0c04611ca4
commit 011cfbc670

View File

@ -73,16 +73,16 @@ def flagsplit(s):
return imapsplit(s[1:-1]) return imapsplit(s[1:-1])
def __options2hash(list): def __options2hash(l_list):
"""convert list [1,2,3,4,5,6] to {1:2, 3:4, 5:6}""" """convert l_list [1,2,3,4,5,6] to {1:2, 3:4, 5:6}"""
# effectively this does dict(zip(l[::2],l[1::2])), however # effectively this does dict(zip(l[::2],l[1::2])), however
# measurements seemed to have indicated that the manual variant is # measurements seemed to have indicated that the manual variant is
# faster for mosly small lists. # faster for mosly small lists.
retval = {} retval = {}
counter = 0 counter = 0
while counter < len(list): while counter < len(l_list):
retval[list[counter]] = list[counter + 1] retval[l_list[counter]] = l_list[counter + 1]
counter += 2 counter += 2
__debug("__options2hash returning:", retval) __debug("__options2hash returning:", retval)
return retval return retval