Repository navigation
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? |
Answered by
nicoddemus
Jul 22, 2021
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.