diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-12-22 14:50:06 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-12-27 12:52:44 -0800 |
commit | 1421535d4856221d684739386c773a2c19151b2c (patch) | |
tree | 6f3808e7272e4472bad5a593ea874256e2a3cc48 /alot | |
parent | c83defdfb735cff6388e20c5dd5d866994fec7b6 (diff) |
db/envelope: Don't call dunder method when not necessary
There are times to call dunder methods explicitly (double underscore
methods, like __contains__), but that's usually only required when
dealing with inheritance. In this case using the standard 'k in d'
syntax is clearer.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/db/envelope.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/db/envelope.py b/alot/db/envelope.py index ef8171d6..bb0d9e2e 100644 --- a/alot/db/envelope.py +++ b/alot/db/envelope.py @@ -109,7 +109,7 @@ class Envelope(object): self.modified_since_sent = True def __contains__(self, name): - return self.headers.__contains__(name) + return name in self.headers def get(self, key, fallback=None): """secure getter for header values that allows specifying a `fallback` |