From 36d0ffff36ce29f28f999899de1c93572f877e3e Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Fri, 19 Jan 2024 12:43:58 +0100 Subject: [PATCH] NamedItemList: include class name in `repr()` thanks to [at]kayoub5 for the suggestion! Signed-off-by: Andreas Lauser Signed-off-by: Gerrit Ecke --- odxtools/nameditemlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odxtools/nameditemlist.py b/odxtools/nameditemlist.py index 650c5362..861f0467 100644 --- a/odxtools/nameditemlist.py +++ b/odxtools/nameditemlist.py @@ -172,7 +172,7 @@ def __str__(self) -> str: return f"[{', '.join( [self._get_item_key(x) for x in self])}]" def __repr__(self) -> str: - return f"[{', '.join([repr(x) for x in self])}]" + return f"{type(self).__name__}([{', '.join([repr(x) for x in self])}])" class NamedItemList(ItemAttributeList[T]):