[issue1106] Error in random.shuffle
Vizcaynot
report at bugs.python.org
Wed Sep 5 04:20:43 CEST 2007
New submission from Vizcaynot:
In python 3.0a1 under Win XP SP2:
Typing next code:
import random
s=range(10)
random.shuffle(s)
I have next error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\python30\lib\random.py", line 262, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: 'range' object does not support item assignment
It does not happen in python 2.5
----------
components: Library (Lib)
messages: 55653
nosy: Viscaynot
severity: normal
status: open
title: Error in random.shuffle
type: crash
versions: Python 3.0
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1106>
__________________________________
More information about the Python-bugs-list
mailing list