From 011cfbc67069675e1cdd2e65a467571e98a05596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sat, 10 Oct 2020 18:59:04 +0200 Subject: [PATCH] Do not use built-in list variable This patch changes the ilst built-in variable to l_list. --- offlineimap/imaputil.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/offlineimap/imaputil.py b/offlineimap/imaputil.py index 63aae67..8509edf 100644 --- a/offlineimap/imaputil.py +++ b/offlineimap/imaputil.py @@ -73,16 +73,16 @@ def flagsplit(s): return imapsplit(s[1:-1]) -def __options2hash(list): - """convert list [1,2,3,4,5,6] to {1:2, 3:4, 5:6}""" +def __options2hash(l_list): + """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 # measurements seemed to have indicated that the manual variant is # faster for mosly small lists. retval = {} counter = 0 - while counter < len(list): - retval[list[counter]] = list[counter + 1] + while counter < len(l_list): + retval[l_list[counter]] = l_list[counter + 1] counter += 2 __debug("__options2hash returning:", retval) return retval