Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
1aa1e28a
Commit
1aa1e28a
authored
Feb 13, 2012
by
Nicolas Dandrimont
🤔
Browse files
Add __contains__ for the Changes object
parent
0f93d9d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/lib/changes.py
View file @
1aa1e28a
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment