diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-12-20 10:46:53 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-12-21 17:18:39 -0800 |
commit | e6fbfd5aab0d8fd9873ebe04f318180287872285 (patch) | |
tree | 8f000a71d388a2a803a5b02e4f870dadb4e6a988 /alot/__main__.py | |
parent | 751b4fa7220f826e6ce1019cc332dbbbb0a7c79b (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/__main__.py')
-rw-r--r-- | alot/__main__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/__main__.py b/alot/__main__.py index 34c36b52..829983c5 100644 --- a/alot/__main__.py +++ b/alot/__main__.py @@ -24,7 +24,7 @@ class SubcommandOptions(usage.Options): def as_argparse_opts(self): optstr = '' - for k, v in self.items(): + for k, v in self.iteritems(): # flags translate int value 0 or 1.. if k in [a[0] for a in self.optFlags]: # if flag optstr += ('--%s ' % k) * v |