selectable_int: make FieldSelectableInt.__repr__ more flexible
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 19 Apr 2022 12:57:37 +0000 (12:57 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 19 Apr 2022 12:57:37 +0000 (12:57 +0000)
src/openpower/decoder/selectable_int.py

index 9e1495d5a0fe5369a60ca185c7cc26012710bc57..81e5a9f4eecce7b0ee14eb03c3fe6155a073c9f2 100644 (file)
@@ -120,7 +120,7 @@ class FieldSelectableInt:
         return fi
 
     def __repr__(self):
-        return "FieldSelectableInt(si=%s, br=%s)" % (self.si, self.br)
+        return f"{self.__class__.__name__}(si={self.si}, br={self.br})"
 
     def asint(self, msb0=False):
         res = 0