insndb/core: switch PCode to Tuple
authorDmitry Selyutin <ghostmansd@gmail.com>
Sat, 10 Jun 2023 18:20:33 +0000 (21:20 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 10 Jun 2023 18:20:33 +0000 (21:20 +0300)
src/openpower/insndb/core.py

index defe898a6ee9ce232da46698e611be58bb15dfc2..4f4213287f882b7a5b1990ba64c9bb3109547c1d 100644 (file)
@@ -924,16 +924,8 @@ class Arguments(tuple):
         return super().__new__(cls, items)
 
 
-class PCode:
-    def __init__(self, iterable):
-        self.__pcode = tuple(iterable)
-        return super().__init__()
-
-    def __iter__(self):
-        yield from self.__pcode
-
-    def __repr__(self):
-        return self.__pcode.__repr__()
+class PCode(Tuple, datatype=str):
+    pass
 
 
 class MarkdownRecord(Dataclass):