[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2022-04-05 Thread Peter Lovett
Change by Peter Lovett : -- nosy: +PeterL777 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2019-03-28 Thread Inada Naoki
Inada Naoki added the comment: I don't think we need it. So I reject it. If you believe many Pythonista really need it, please start discussion on python-dev. -- ___ Python tracker

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2019-03-28 Thread Julian Berman
Julian Berman added the comment: Yes I know *why* it worked in Py2 -- still seems like an oversight :) To me, comparing (multi)set-like is the only reasonable behavior there which is what IIRC the patch did, but even without that, for a given dict, d.values() != d.values(). So, it's not like

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2019-03-28 Thread Inada Naoki
Inada Naoki added the comment: > Well, surely there are reasonable semantics :), because dict.values == > dict.values was comparable before we had view objects. Because it was list. Now values view is not sequence-like or set-like. >>> {"a": "foo", "b": "bar"}.values() == {"a": "bar", "b": "

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2019-03-28 Thread Julian Berman
Julian Berman added the comment: Well, surely there are reasonable semantics :), because dict.values == dict.values was comparable before we had view objects. It's been awhile since I filed this, and still seems rather silly that: {"a": "foo"}.values() != {"a": "foo"}.values() True On T

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2019-03-28 Thread Inada Naoki
Inada Naoki added the comment: There is no reasonable semantics for values view. Keep it unimplemented. -- nosy: +inada.naoki resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2011-06-30 Thread Julian
Julian added the comment: Looking over this again with a clear head, adding the number operators is the incorrect thing to do here I think, since that function was also written assuming we had a set-like view object as input. I am inclined to think that the correct behavior here for those ope

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2011-06-29 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, rhettinger stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list maili

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2011-06-29 Thread Julian
New submission from Julian : dict view values() objects are missing tp_richcmp and tp_as_sequence, and the tests for those were incomplete, which means that on 2.7 and 3.2 (and on current head) viewvalues / values objects don't compare correctly. Without indication, I assume this is not the de