Python bt2: value is a write-only property
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 14 Sep 2017 15:47:36 +0000 (11:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 16 Sep 2017 02:24:30 +0000 (22:24 -0400)
commite1c6bebdd944ff21e358c167ef7bb4cbc68b9c28
treeb4831eb2e440e44261d62b8e97d5bb8f53246d79
parent742e47472d24b6d4a6ebc2bdba0a87e0bc88a744
Python bt2: value is a write-only property

This commit turns 'value' into a write-only property. The
value property is needed to distinguish between:

my_var = bt2.IntegerFieldType(32)(123456)
my_var = 123

my_var = bt2.IntegerFieldType(32)(123456)
my_var.value = 123

The value 'getter' is not necessary since the various field types
implement the interfaces needed to act as native Python types
(collections.abc.Sequence, collections.abc.Mapping, numbers.Integral,
etc.)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/bt2/bt2/fields.py
tests/bindings/python/bt2/test_fields.py
This page took 0.024578 seconds and 4 git commands to generate.