[issue37119] Equality on dict.values() are inconsistent between 2 and 3

2019-06-02 Thread 林自均
林自均 added the comment: Hi Karthikeyan and Serhiy, Thank you for the explanation. I'll check the references you gave me. -- ___ Python tracker ___ _

[issue37119] Equality on dict.values() are inconsistent between 2 and 3

2019-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue12445. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> dict view values objects are missing tp_richcmp and tp_as_number ___ Python trac

[issue37119] Equality on dict.values() are inconsistent between 2 and 3

2019-05-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://docs.python.org/3/library/stdtypes.html#dictionary-view-objects > Keys views are set-like since their entries are unique and hashable. If all > values are hashable, so that (key, value) pairs are unique and hashable, then > the items view i

[issue37119] Equality on dict.values() are inconsistent between 2 and 3

2019-05-31 Thread 林自均
New submission from 林自均 : When I create 2 different dicts with the same literal, their dict.values() are equal in python2 but not equal in python3. Here is an example in python2: $ python2 Python 2.7.16 (default, Mar 4 2019, 09:02:22) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang