jenkins-bot submitted this change.
[IMPR] Add repr() method to BaseDataDict and ClaimCollection
Change-Id: I26a3048a0fa4696a435fe597dc075c8d56962d4b
---
M pywikibot/page/__init__.py
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index 46ecef9..94e9c55 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -3397,6 +3397,9 @@
key = self.normalizeKey(key)
return key in self._data
+ def __repr__(self):
+ return '{}({})'.format(type(self), self._data)
+
@staticmethod
def normalizeKey(key) -> str:
"""Helper function to return language codes of a site object."""
@@ -3531,6 +3534,9 @@
def __contains__(self, key):
return key in self._data
+ def __repr__(self):
+ return '{}({})'.format(type(self), self._data)
+
@classmethod
def normalizeData(cls, data):
# no normalization here, should there be?
To view, visit change 642905. To unsubscribe, or for help writing mail filters, visit settings.