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-04-17.21:48:16
SpamBayes Score 0.017156063
Marked as misclassified No
Message-id <59287CB2-E678-4A1F-8E03-710ABCB92018@gmail.com>
In-reply-to <1208467609.85.0.97265388481.issue2610@psf.upfronthosting.co.za>
Content
On Apr 17, 2008, at 4:26 PM, Amaury Forgeot d'Arc wrote:

>
> Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:
>
> Some review of dv_range.patch:
>
> - repr(d.keys()) depends on the internal ordering of items, their hash
> values, the insertion order... the test seems fragile.
> Or you may rely on the fact that ints are their own hash values, so a
> small dict containing small keys will appear ordered. I suggest
> something like {6: 1.2, 1: 'A', 7: 42, 4: None}

I wondered about that, but my assumption was that the hash function  
for strings and ints was equally unlikely to change.  I can go with  
all ints if that is really a safer assumption.

>
>
> - empty dicts or empty ranges will display:
>   <range: >
>   <dict_items: >
> Isn't there a better repr? At least this should appear in the tests.

I'm not sure how to represent that better.
<range: None>
<dict_items: None>       -- These seem misleading

<range: empty>
<dict_items: empty>       -- I'm not sure that is better than  
<dict_items: > and empty may not mean anything to non-english speakers

I'll be happy to add the test for the empty case after once I know  
what it should look like.

>
>
> ----------
> nosy: +amaury.forgeotdarc
>
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue2610>
> __________________________________
History
Date User Action Args
2008-04-17 21:48:18bmillersetspambayes_score: 0.0171561 -> 0.017156063
recipients: + bmiller, loewis, rhettinger, amaury.forgeotdarc, belopolsky, benjamin.peterson
2008-04-17 21:48:17bmillerlinkissue2610 messages
2008-04-17 21:48:16bmillercreate