Commit 1aa1e28a authored by Nicolas Dandrimont's avatar Nicolas Dandrimont 🤔
Browse files

Add __contains__ for the Changes object

parent 0f93d9d7
...@@ -89,6 +89,15 @@ class Changes(object): ...@@ -89,6 +89,15 @@ class Changes(object):
""" """
return self._data[key] return self._data[key]
def __contains__(self, key):
"""
Returns whether the specified RFC822 key exists.
``key``
Key of data to check for existence.
"""
return key in self._data
def get(self, key, default=None): def get(self, key, default=None):
""" """
Returns the value of the rfc822 key specified, but defaults Returns the value of the rfc822 key specified, but defaults
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment