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>
Sun, 17 Sep 2017 18:10:51 +0000 (14:10 -0400)
commit72bd705491a1f0b9190bf430880a56dff8d78259
tree7441450ed3f02da37fe5d3c788a22e521dd9510a
parentb3c55b82bf454ebe7ad3775d93d1387039f82041
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.025091 seconds and 4 git commands to generate.