Changes by Raymond Hettinger:
--
resolution: - invalid
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1704
__
___
Python-bugs-list mailing list
Rich Marinaccio added the comment:
To be clear, I am not using multi-threading in my particular module. I
can't explain this behavior with my code alone. The issue is
complicated by the fact that my module is called by Civ IV, and I have
no idea what the game is doing behind the scenes. I
Raymond Hettinger added the comment:
Attaching the whole file isn't a step in the right direction. The
preferred approach is to isolate the problem as tightly as possible.
This report is dubious because, I can't get the following to fail:
from random import seed, randint
seed('mystart')
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
Rich Marinaccio added the comment:
I've done some more testing and I can't get this to repeat with randint
alone. It must be an issue with combination of the len() function used
as a parameter to randint. The above code is in a loop that further
down will del preshuffle[randIndex]. Could this
Raymond Hettinger added the comment:
Threading is the likely source of your problems. If you concur, please
close this as invalid.
--
nosy: +rhettinger
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1704
__
New submission from Rich Marinaccio:
I have been using python for Civilization IV map scripting, and I
believe I have found a small problem with the randint function. Once in
a blue moon, randint(a,b) returns b + 1, rather than a = N = b. I
have seen this behavior a few times. Here is the
Rich Marinaccio added the comment:
I have been using python for Civilization IV map scripting, and I
believe I have found a small problem with the randint function. Once in
a blue moon, randint(a,b) returns b + 1, rather than a = N = b. I
have seen this behavior a few times. Here is the code