[issue1704] possible bug in randint

Rich Marinaccio report at bugs.python.org
Sat Dec 29 18:40:46 CET 2007


Rich Marinaccio added the comment:

What was happening before was I was getting an index out of range error 
every so often, so then I put in the ValueError catch to see what was 
going on. I was surprised to see that randIndex was the same as len
(preshuffle). I have some further catches in place now that might tell 
me more. It must have to do with deleting items from the list in the 
loop and not getting the right length from len immediately after, but 
then again I use this algorithm in several places in my module with no 
trouble, though with smaller lists. Go ahead and close this, and when I 
have more information I can open it some other time. This bug I'm 
seeing is extremely intermittant.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1704>
__________________________________


More information about the Python-bugs-list mailing list