bt2: make `BoolValue` inherit `_IntegralValue`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jun 2019 04:02:01 +0000 (00:02 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 01:31:27 +0000 (21:31 -0400)
commit88d393137acf702d11aee0de515dc8688b9afc07
treee6735b90e5aa824b904148a61573cd143a9b5141
parentf11ed06245a17724c8c9dd9627be19fab069fca4
bt2: make `BoolValue` inherit `_IntegralValue`

This is just like

    issubclass(bool, numbers.Integral)
    issubclass(bool, int)

are true.

It makes `BoolValue` behave even more like `bool`, for example you can
now do:

    3 << bt2.BoolValue(True)

(which is 6).

Also remove BoolValue.__eq__() because _NumericValue.__eq__() does the
job now.

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