Author mathtester
Recipients mathtester
Date 2020-09-25.05:14:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If I run this one line of code:

random.choices(range(2**100), k=5)

I would get error:

OverflowError: Python int too large to convert to C ssize_t

But I can run equivalent line to achieve this without error:

[random.randint(0, 2**100-1) for j in range(5)]

With the understanding of the issue coming from len(), ref, I still think random.choices() should be able to handle large integers.
Date User Action Args
2020-09-25 05:14:18mathtestersetrecipients: + mathtester
2020-09-25 05:14:18mathtestersetmessageid: <>
2020-09-25 05:14:18mathtesterlinkissue41860 messages
2020-09-25 05:14:18mathtestercreate