Python论坛  - 讨论区

标题:[python-chinese] 生成随机序列的算法

2007年06月26日 星期二 15:52

leopay leopay在gmail.com
星期二 六月 26 15:52:42 HKT 2007

random moduleÖÐÓиösampleº¯Êý¿ÉÒÔÉú³ÉËæ»úÐòÁУ¬ËüÊÇÔõÑùʵÏֵģ¿
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070626/91ba6ae3/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年06月26日 星期二 20:30

wang yingqi wangyingqi在gmail.com
星期二 六月 26 20:30:35 HKT 2007

sample本身的实现可以看一下lib/random.py,里面有实际的实现代码。看一下就能了解了。但是底层调用的random()方法是在C里面实现的!

On 6/26/07, leopay <leopay at gmail.com> wrote:
>
> random module中有个sample函数可以生成随机序列,它是怎样实现的?
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
wangyingqi
welcome to visite http://wps.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20070626/302c4ef6/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年06月26日 星期二 21:05

icekernel icekernel在gmail.com
星期二 六月 26 21:05:58 HKT 2007

Õâ¸öºÃÏñÊÇαËæ»úÊý°É

ÔÚ07-6-26£¬wang yingqi <wangyingqi在gmail.com> дµÀ£º
>
>
> sample±¾ÉíµÄʵÏÖ¿ÉÒÔ¿´Ò»ÏÂlib/random.py£¬ÀïÃæÓÐʵ¼ÊµÄʵÏÖ´úÂë¡£¿´Ò»Ï¾ÍÄÜÁ˽âÁË¡£µ«Êǵײãµ÷ÓõÄrandom()·½·¨ÊÇÔÚCÀïÃæʵÏֵģ¡
>
> On 6/26/07, leopay <leopay在gmail.com > wrote:
> >
> > random moduleÖÐÓиösampleº¯Êý¿ÉÒÔÉú³ÉËæ»úÐòÁУ¬ËüÊÇÔõÑùʵÏֵģ¿
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
>
> --
> wangyingqi
> welcome to visite http://wps.cn
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
gtalk: icekernel在gmail.com
blog:  http://www.bulaoge.com/?icekernel
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070626/fdae1f32/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号