[issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version

2021-05-31 Thread Kshitish Kumar


New submission from Kshitish Kumar :

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 
<https://bugs.python.org/issue44272>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version

2021-05-31 Thread Kshitish Kumar


Kshitish Kumar  added the comment:

I was expecting a proper result from this code. Because If you do same thing in 
other computer language. You will get a proper answer.

--

___
Python tracker 
<https://bugs.python.org/issue44272>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com