首页 > 解决方案 > 在哪里可以找到 Python 源代码分发中的示例,例如 Modules/xxmodule.c?

问题描述

我在这里阅读 Python 文档:https ://docs.python.org/3/extending/extending.html#a-simple-example ,第 1.4 节,其中说:

一个更重要的示例模块包含在 Python 源代码分发中,即 Modules/xxmodule.c。该文件可用作模板或仅作为示例阅读。

如何确定 Modules/xxmodule.c 的位置?这是我安装 Python 时保存的东西吗?

我在 Windows 上使用 Python 3.7 32 位。

标签: python

解决方案


安装 Python 时不包含 C 文件。它们包含在源代码分发中,或者您可以在CPython Git 存储库中找到它们。


推荐阅读