mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
#10661: give QName a nicer repr.
This commit is contained in:
parent
fb1720b0f5
commit
b56c0e24d6
1 changed files with 2 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue