current system time is used; current system time is also used to initialize the generator when the module is first imported. If randomness sources are provided by the operating system, they are used instead of the system time (see the os.urandom() function for details on availability).
Random Docs
“使用来源,卢克!”。。。;-). 学习https://svn.python.org/projects/python/trunk/Lib/random.py会很快让你安心;-)。
当种子没有设定时会发生什么(这是“我没有”的情况):
指数变量:
很明显,使用的是与其他方法相同的底层随机生成器,因此也同样受到播种或缺乏播种的影响(真的,否则怎么做呢?-)
a)它通常使用系统时钟,某些系统上的时钟可能只有ms精度,因此种子两次非常快可能导致相同的值。
b)我想expovariate可以,但我找不到任何证据。如果没有,那就太傻了
相关问题 更多 >
编程相关推荐