[issue10661] ElementTree QName has a very uninformative repr()

2010-12-09 Thread Georg Brandl

Georg Brandl  added the comment:

Granted.  Since the rest of the file uses old-style format, I've kept to it, 
r87148.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10661] ElementTree QName has a very uninformative repr()

2010-12-09 Thread Eric Smith

Eric Smith  added the comment:

This should be either:
'' % (self.text,)
or:
''.format(self.text)

If self.text is a tuple (which granted is its own error), then the version 
checked in will raise an exception.

--
nosy: +eric.smith
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10661] ElementTree QName has a very uninformative repr()

2010-12-09 Thread Georg Brandl

Georg Brandl  added the comment:

Added in r87147.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10661] ElementTree QName has a very uninformative repr()

2010-12-09 Thread Jean-Paul Calderone

New submission from Jean-Paul Calderone :

This is somewhat unfortunate behavior:

>>> from xml.etree.ElementTree import QName
>>> QName('foo')

>>> 

It becomes even more apparent when encountered in a situation like this:

>>> print {QName('foo'): 'bar', QName('baz'): 'quux'}
{: 'bar', 
: 'quux'}
>>> 

I would like to see QName.__repr__ return something like '' % (text,)

--
messages: 123687
nosy: exarkun
priority: normal
severity: normal
status: open
title: ElementTree QName has a very uninformative repr()
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com