New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
random.shuffle's random= argument got deprecated #1479
Comments
well that's annoying. |
Why not to use just fixed_random.shuffle(seq) ? |
is that documented? I don't see it on https://docs.python.org/3/library/random.html |
yeah that's what the current code is using? |
I think what @serhiy-storchaka is suggesting that, since you set a custom seed you can use directly def _shuffled(seq: Sequence[str]) -> List[str]:
"""Deterministically shuffle"""
fixed_random = random.Random()
fixed_random.seed(FIXED_RANDOM_SEED, version=1)
seq = list(seq)
fixed_random.shuffle(seq)
return seq |
I get that, but where in the documentation does it say that |
|
🤦 and here I was expecting it to be documented under https://docs.python.org/3/library/random.html#random.Random |
Related issue: bpo-40465.
The text was updated successfully, but these errors were encountered: