From d623d2e9f970ec76df76c77e813459563f55ff77 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 23 Nov 2017 14:43:04 -0500 Subject: [PATCH] Implement __repr__ for _StringField MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Philippe Proulx Reviewed-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- bindings/python/bt2/bt2/fields.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bindings/python/bt2/bt2/fields.py b/bindings/python/bt2/bt2/fields.py index 2e2796c9..0bfbc58f 100644 --- a/bindings/python/bt2/bt2/fields.py +++ b/bindings/python/bt2/bt2/fields.py @@ -426,6 +426,9 @@ class _StringField(_Field, collections.abc.Sequence): def __bool__(self): return bool(self._value) + def __repr__(self): + return repr(self._value) + def __str__(self): return self._value -- 2.34.1