Skip to content

Commit

Permalink
NamedItemList: include class name in repr()
Browse files Browse the repository at this point in the history
thanks to [at]kayoub5 for the suggestion!

Signed-off-by: Andreas Lauser <[email protected]>
Signed-off-by: Gerrit Ecke <[email protected]>
  • Loading branch information
andlaus committed Jan 19, 2024
1 parent 489494c commit 36d0fff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion odxtools/nameditemlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down

0 comments on commit 36d0fff

Please sign in to comment.