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/buffers.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/buffers.py')
-rw-r--r-- | alot/buffers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/buffers.py b/alot/buffers.py index e93f9356..2389ed1f 100644 --- a/alot/buffers.py +++ b/alot/buffers.py @@ -144,7 +144,7 @@ class EnvelopeBuffer(Buffer): hidden = settings.get('envelope_headers_blacklist') # build lines lines = [] - for (k, vlist) in self.envelope.headers.items(): + for (k, vlist) in self.envelope.headers.iteritems(): if (k not in hidden) or self.all_headers: for value in vlist: lines.append((k, value)) |