bt2: create_value(): check `numbers` and `collections.abc` types
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jun 2019 05:16:21 +0000 (01:16 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 01:31:27 +0000 (21:31 -0400)
commit665658c2f8c04a8616e0f95ffa5d56e8c12f9668
tree33d5d29209a682ea5b24c00f26bb73f9a4f0b80c
parent91189aebe7163493f81e839b1e8517dcd43d65bd
bt2: create_value(): check `numbers` and `collections.abc` types

This is just like what's done within _NumericValue._extract_value(),
_IntegerValue._value_to_int(), RealValue._value_to_float(),
StringValue._value_to_str(), ArrayValue.__eq__(), and MapValue.__eq__().

It is more versatile than checking for the specific built-in types.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I93902e58b6adf3f9cd5c03c7c422148d577b5f0f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1571
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/bindings/python/bt2/bt2/value.py
This page took 0.025614 seconds and 4 git commands to generate.