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>
Sat, 2 Dec 2017 13:42:03 +0000 (14:42 +0100)
commit836562693cdd3af4ed861db7770daef040d4d920
treea325a9e8fc069276b401fe5e787e8330e0748f7f
parent12bf0d8803d1a1644fa8a8ba343c100236309ea2
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.024935 seconds and 4 git commands to generate.