randomize order of dict methods items(), values(), keys() #8934
-
I am looking at this code.
Up to now the hash was stable. But this is pure luck. Is there a way to make the dict methods items(), values() and keys() return the items in random order? |
Beta Was this translation helpful? Give feedback.
Answered by
nicoddemus
Jul 22, 2021
Replies: 1 comment 3 replies
-
@guettli not clear what you mean, and why this is related to pytest.
Since Python 3.7 dicts are ordered, so I'm not sure how this has changed for you. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
guettli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@guettli not clear what you mean, and why this is related to pytest.
Since Python 3.7 dicts are ordered, so I'm not sure how this has changed for you.