bt2: values: remove public `value` getter
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 13 Sep 2017 23:05:29 +0000 (19:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 16 Sep 2017 02:58:29 +0000 (22:58 -0400)
commit9b6cd4a7e109d42d4a70c8417394aa5473b04d24
treeaf5bad39e6c8fd43c5d3e38ac316488d3e7105d6
parent15012c4b5e7049bb09e8d53e84e0a2a3d1b2de5c
bt2: values: remove public `value` getter

The public `value` getter (e.g., `my_int_value.value`) is redundant here
since the `bt2.values` object already act like their Python equivalent.
If you need an `int` value out of a `bt2.IntegerValue` object, for
example, you can just use `int(bt_value)` instead of `bt_value.value`.

We keep the `value` setter because this is used to set the underlying
raw value.

Internally, we keep the private `_value` getter to access the object's
raw value.

In the tests, we copy the value to modify instead of using the `value`
property with this pattern:

    orig_value = copy.copy(value)
    # modify value
    self.assertEqual(value, orig_value)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/bt2/bt2/values.py
tests/bindings/python/bt2/test_values.py
This page took 0.024034 seconds and 5 git commands to generate.