在python源代码中查找_collections

dam*_*mon 8 python

我想看一下python deque类.当我检查源代码时,我在第10行找到了以下内容

 from _collections import deque, defaultdict
Run Code Online (Sandbox Code Playgroud)

我在哪里可以找到这个_collections模块?我搜索了我的python源副本,但无法发现它.

这个班级在哪里?

fal*_*tru 11

_collections 是内置的扩展模块.

您可以在此处找到_collection模块的源代码.

Setup.dist包含内置扩展模块名称与源文件之间的映射.