This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bmiller
Recipients amaury.forgeotdarc, belopolsky, benjamin.peterson, bmiller, loewis, rhettinger
Date 2008-06-17.12:29:38
SpamBayes Score 0.0002611303
Marked as misclassified No
Message-id <e45086040806170529n6f7407c4v28bcb107ee73bca3@mail.gmail.com>
In-reply-to <1213680182.53.0.244474364392.issue2610@psf.upfronthosting.co.za>
Content
On Tue, Jun 17, 2008 at 12:23 AM, Martin v. Löwis
<report@bugs.python.org> wrote:
>
> Martin v. Löwis <martin@v.loewis.de> added the comment:
>
> After reviewing this again, I'm skeptical that this is a good idea. It
> doesn't achieve its original purpose (anymore), as it only changes
> tp_str for range objects (although it does change tp_repr for dict views
> - why this inconsistency?).
>
The reason for the inconsistency is that there was a strong argument
that the tp_repr for range already returned something useful that
people could take advantage of in their code.  The same was not the
case for the dict views.

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>

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

So if, as Raymond Hettinger suggests, the interpreter is the right
place to make this change I'd still be happy to provide a patch if
someone could give me a pointer for where to start looking.

Brad

> So I'm -0 on the patch, meaning that I won't commit it, but won't object
> to anybody else committing it, either.
>
> Technically, in dictview_repr, the first call to PyUnicode_Concat isn't
> checked for exceptions.
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue2610>
> _______________________________________
>
History
Date User Action Args
2008-06-17 12:29:52bmillersetspambayes_score: 0.00026113 -> 0.0002611303
recipients: + bmiller, loewis, rhettinger, amaury.forgeotdarc, belopolsky, benjamin.peterson
2008-06-17 12:29:46bmillerlinkissue2610 messages
2008-06-17 12:29:44bmillercreate