Implement __repr__ instead of __str__ for python Value
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 26 Nov 2017 10:46:19 +0000 (11:46 +0100)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 6 Dec 2017 15:51:27 +0000 (10:51 -0500)
commit2ef5b04b43c3e4ef959dfdddeef7991cffb283a7
tree4d464d21df55a9c3d0d8ef69d4f6eb782992a119
parentdc78ca2f370b9f327c541ba023da35e28d4fc7a0
Implement __repr__ instead of __str__ for python Value

Implement the __repr__ method for the various Value classes
as it provides a fallback for __str__ and provides both a
non-ambiguous and human-readable string representation of those
objects.

The Array and Map values' implementation is made more compact by
using list comprehensions, as is done for the Fields API.

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