[New-bugs-announce] [issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version
Kshitish Kumar
report at bugs.python.org
Mon May 31 04:08:06 EDT 2021
New submission from Kshitish Kumar <kkshitish at yahoo.com>:
Code:
import random as ran
x = ran.shuffle(10,random=1)
Output:
DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version.
x = ran.shuffle(10,random=1)
File "C:\Users\nisha\AppData\Local\Programs\Python\Python39\lib\random.py", line 369, in shuffle
for i in reversed(range(1, len(x))):
TypeError: object of type 'int' has no len()
----------
files: main.py
messages: 394792
nosy: Kkshitish
priority: normal
severity: normal
status: open
title: DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version
versions: Python 3.9
Added file: https://bugs.python.org/file50075/main.py
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44272>
_______________________________________
More information about the New-bugs-announce
mailing list