clean1.py
Go to the documentation of this file.
1 """
2 .. module:: clean1
3 
4 This Python module should pass ``pylint`` cleanly.
5 
6 """
7 
8 def get(msg, key):
9  """ Get property value.
10 
11  :param msg: Message containing properties.
12  :param key: Property key to match.
13 
14  :returns: Corresponding value, if defined; None otherwise.
15  Beware: the value may be '', which evaluates False as a
16  predicate, use ``is not None`` to test for presence.
17  """
18  for prop in msg.props:
19  if prop.key == key:
20  return prop.value
21  return None
def get(msg, key)
Definition: clean1.py:8


roslint
Author(s): Mike Purvis, Jack O'Quin
autogenerated on Wed Mar 18 2020 03:20:56