bt2: add `StringValue.__contains__()` method
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 16 Aug 2019 15:43:00 +0000 (11:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:22 +0000 (11:58 -0400)
commitef12398a8bfc7d5f01f83d6ab3b35a55729b03c5
tree32a7d497acebe894eb72cfab1b69d810af8d0f8d
parent2d292bfa2f3ad8f89c104238596235898ff12ca3
bt2: add `StringValue.__contains__()` method

This is useful to use the `in` Python operator like we do with regular
Python `str` objects:

  if 'my_env_var' in env_string_value:
    ...

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I8f7f5c02d71bc089e14c3b8f2ffa81045a9e8f15
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1954
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/bindings/python/bt2/bt2/value.py
tests/bindings/python/bt2/test_value.py
This page took 0.024765 seconds and 4 git commands to generate.