# python源码结构

## 目录结构

```
.
├── Doc
├── Grammar
├── Include  Python提供的所有头文件，如果用户需要自己用 C 或 C++来编写自定义模块扩展 Python，那么就需要用到这里提供的头文件。
├── LICENSE
├── Lib  包含了 Python 自带的所有标准库，且都是用 Python 语言编写的。Lib 目录下存放一些对速度没有太严格要求的模块，比如 os。
├── Mac
├── Makefile.pre.in
├── Misc
├── Modules 包含了所有用C语言编写的模块，比如 math、hashlib 等。它们都是那些对速度要求非常严格的模块。而相比而言
├── Objects  包含了所有 Python 的内建对象，包括整数、list、dict 等。同时，该目录还包括了 Python 在运行时需要的所有的内部使用对象的实现。
├── PC
├── PCbuild 
├── Parser  包含了 Python 解释器中的 Scanner 和 Parser 部分，即对 Python 源代码进行词法分析和语法分析的部分。除此以外，此目录还包含了一些有用的工具，这些工具能够根据 Python 语言的语法自动生成 Python 语言的词法和语法分析器，与 YACC 非常类似。
├── Programs 包含了 Python 二进制可执行文件的源码。
├── Python  包含了 Python 解释器中的 Compiler 和执行引擎部分，是 Python 运行的核心所在。
├── README.rst
├── Tools
├── aclocal.m4
├── config.guess
├── config.sub
├── configure
├── configure.ac
├── install-sh
├── m4
├── pyconfig.h.in
└── setup.py
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://im-qianuxn.gitbook.io/pytorch/ji-suan-ji/python-yuan-ma-yue-du/jie-gou.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
