如何查看python内置函数源码


当前第2页 返回上一页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

def expovariate(self, lambd):

        """Exponential distribution.

        lambd is 1.0 divided by the desired mean.  It should be

        nonzero.  (The parameter would be called "lambda", but that is

        a reserved word in Python.)  Returned values range from 0 to

        positive infinity if lambd is positive, and from negative

        infinity to 0 if lambd is negative.

        """

        # lambd: rate lambd = 1/mean

        # ('lambda' is a Python reserved word)

  

        # we use 1-random() instead of random() to preclude the

        # possibility of taking the log of zero.

        return -_log(1.0 - self.random())/lambd

更多Python相关技术文章,请访问Python教程栏目进行学习!

以上就是如何查看python内置函数源码的详细内容,更多文章请关注木庄网络博客!!

返回前面的内容

相关阅读 >>

Python有64位的吗

Python爬虫需要安装什么

Python如何实现自动访问网页功能

Python爬虫和八爪鱼哪个快

如何利用Python制作exe文件[适合初学者]

Python运算符-实战中常用的三个逻辑运算符使用实例

Python中pow什么意思

Python判断循环体结束的方法

Python安装到哪个盘

Python可以在手机上运行吗

更多相关阅读请进入《Python》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...