[issue22479] strange behavior of importing random module

2014-09-24 Thread Steven D'Aprano
Steven D'Aprano added the comment: For future reference, we *strongly* recommend that instead of taking a screen shot and posting it as an attachment, you copy and paste the text directly. Don't retype it, any decent terminal application will allow you to select and copy the text, then paste i

[issue22479] strange behavior of importing random module

2014-09-24 Thread STINNER Victor
STINNER Victor added the comment: It's not a bug in Python. The problem is that your project contains a file called "random.py" which is used instead of the random from the standard library. Rename the file (and remove random.pyc). -- nosy: +haypo resolution: -> not a bug status: open

[issue22479] strange behavior of importing random module

2014-09-24 Thread Bekket McClane
New submission from Bekket McClane: When I import the random module using "import random" in the command line, it worked fine. But if I import it in the file, the program will throw a strange error, but sometimes it just exit right away after the import statement with no error. Moreover, if I