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>
Sun, 17 Sep 2017 18:10:51 +0000 (14:10 -0400)
commit80d037bccf5043d23bfc09e1f45a5198929f0411
tree81d43550afd3a6189c581a1056d15bad4aa14788
parent253a8c0d9167365fc2e31f0ecafcd57e017ec914
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.024809 seconds and 4 git commands to generate.