bt2: add `StringValue.__contains__()` method
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 16 Aug 2019 15:43:00 +0000 (11:43 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 20:05:01 +0000 (16:05 -0400)
commit5cf62322294f2ff5fd92996115030823eadc0e49
treef29cdb1987c624f958b0857a3241a2bacbe8b9df
parent9442c9a2f3892a319d08241a2c9d2c062da6871d
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.027081 seconds and 4 git commands to generate.