相关疑难解决方法(0)

为什么一些内置的Python函数只有传递?

我想看看math.py函数是如何实现的,但是当我在PyCharm中打开文件时,我发现所有函数都是空的,并且有一个简单的函数pass.例如:

def ceil(x): # real signature unknown; restored from __doc__
    """
    ceil(x)

    Return the ceiling of x as a float.
    This is the smallest integral value >= x.
    """
    pass
Run Code Online (Sandbox Code Playgroud)

我想这是因为使用的函数实际上来自C标准库.它是如何工作的?

python standard-library pycharm c-standard-library

28
推荐指数
1
解决办法
3589
查看次数