[issue2610] string representation of range and dictionary views

Martin v. Löwis report at bugs.python.org
Tue Jun 17 23:35:51 CEST 2008


Martin v. Löwis <martin at v.loewis.de> added the comment:

> I do not understand why you think that having the interpreter display
> <dict_keys: 2, 3, 4, ...>
> when x.keys() is called is not an improvement over
> <dict_keys object at 0xe72b0>

I didn't say that the change in dict_keys is not an improvement,
but that the patch doesn't achieve its objective anymore, which
was to display range() nicely at the interactive prompt.

> Maybe it is just because I spend a lot more time in the interactive
> interpreter that I see this as a big improvement.

So do I. But I typically display the dictionary itself when looking
at it in an interactive prompt; I would not normally look at .keys(),
except when I want to know what all the keys in the dictionary are,
in which case the new repr won't help, either (and I will have to
apply list() in 3.0, or, rather, sorted())

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2610>
_______________________________________


More information about the Python-bugs-list mailing list