From: Dmitry Selyutin Date: Tue, 19 Apr 2022 12:47:24 +0000 (+0000) Subject: selectable_int: make SelectableInt.__repr__ more flexible X-Git-Tag: sv_maxu_works-initial~497 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f17abc9202dd19fe4f17f573179818cd2a02f099;p=openpower-isa.git selectable_int: make SelectableInt.__repr__ more flexible --- diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index c5e48f9f..9e1495d5 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -420,8 +420,8 @@ class SelectableInt: return self.value != 0 def __repr__(self): - return "SelectableInt(value=0x{:x}, bits={})".format(self.value, - self.bits) + value = f"value=0x{self.value:x}, bits={self.bits}" + return f"{self.__class__.__name__}({value})" def __len__(self): return self.bits