Message339041
| Author |
methane |
| Recipients |
Julian, ezio.melotti, methane, rhettinger |
| Date |
2019年03月28日.13:51:16 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAEfz+TxtqkmK1t1iuz37KK=+v03Md_O6Uf8RdU-kf7bwK0H6qQ@mail.gmail.com> |
| In-reply-to |
<CABJQSkmwgr4tUQtDh1XDPPA824swRZFZRDeFwVTE4H633CqWkw@mail.gmail.com> |
| Content |
> 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": "foo"}.value()
True if set-like. False if sequence-like.
If you want Python 2 behavior, you should convert it to list.
Then you can use "sequence" semantics. |
|