]> granicus.if.org Git - python/commitdiff
#10661: give QName a nicer repr.
authorGeorg Brandl <georg@python.org>
Thu, 9 Dec 2010 18:10:27 +0000 (18:10 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 9 Dec 2010 18:10:27 +0000 (18:10 +0000)
Lib/xml/etree/ElementTree.py

index 75fbea998ad1aac5f83123191971a872fe936667..ef94e146abe8e873753d225073a0befa84371723 100644 (file)
@@ -584,6 +584,8 @@ class QName:
         self.text = text_or_uri
     def __str__(self):
         return self.text
+    def __repr__(self):
+        return '<QName %r>' % self.text
     def __hash__(self):
         return hash(self.text)
     def __le__(self, other):