New submission from Jean-Paul Calderone <[email protected]>:
This is somewhat unfortunate behavior:
>>> from xml.etree.ElementTree import QName
>>> QName('foo')
<xml.etree.ElementTree.QName instance at 0x10049c830>
>>>
It becomes even more apparent when encountered in a situation like this:
>>> print {QName('foo'): 'bar', QName('baz'): 'quux'}
{<xml.etree.ElementTree.QName instance at 0x10049cb90>: 'bar',
<xml.etree.ElementTree.QName instance at 0x10049c248>: 'quux'}
>>>
I would like to see QName.__repr__ return something like '<QName %r>' % (text,)
----------
messages: 123687
nosy: exarkun
priority: normal
severity: normal
status: open
title: ElementTree QName has a very uninformative repr()
type: behavior
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10661>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com