summaryrefslogtreecommitdiff
path: root/alot/widgets/globals.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-12-20 10:46:53 -0800
committerDylan Baker <dylan@pnwbakers.com>2016-12-21 17:18:39 -0800
commite6fbfd5aab0d8fd9873ebe04f318180287872285 (patch)
tree8f000a71d388a2a803a5b02e4f870dadb4e6a988 /alot/widgets/globals.py
parent751b4fa7220f826e6ce1019cc332dbbbb0a7c79b (diff)
Use dict's iter methods
This patch replaces a number of uses of dict.items, dict.values, and dict.keys with their iterative siblings. The advantage of using the iterator version is that they don't copy the keys, values, or items, but simply return references. This reduces memory usage and may speed up the these operations a bit.
Diffstat (limited to 'alot/widgets/globals.py')
-rw-r--r--alot/widgets/globals.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/widgets/globals.py b/alot/widgets/globals.py
index 81b14b70..b4fae0c8 100644
--- a/alot/widgets/globals.py
+++ b/alot/widgets/globals.py
@@ -51,7 +51,7 @@ class ChoiceWidget(urwid.Text):
self.separator = separator
items = []
- for k, v in choices.items():
+ for k, v in choices.iteritems():
if v == select and select is not None:
items += ['[', k, ']:', v]
else: