无法理解 cpython 中 os 模块的实现

Not able to understand the implementation of the os module in cpython

所以我想检查一些标准库的实现。我从 os 库开始,代码是 github.

上的 here

我以一种方法为例 os.listdir(),即使看了代码我也完全不知道它是如何实现的(请原谅这个菜鸟)。我有以下问题:

我认为我遇到的主要问题是该模块是如何设计的,我无法在网上找到任何资源来用更简单的术语进行解释,因此我在这里寻求指导。

编辑:对于提问的 ose,我在 onlinegdb

中尝试了以下代码
import os

if "listdir" in os.__all__:
    print("Yes")
print(os.listdir())

结果只有 main.py,它应该也打印 Yes,也许平台 onlinegdb 是问题,但它清楚地显示 listdir 的输出为 main.py.

在评论中进行讨论后,我现在看到这更多是在线 python 版本问题,而不是 python 或模块本身的问题。