源码[P]分析

文档状态:编辑中....

[网评]
谢谢网易云音乐让我知道真相.

Table of Contents

写在开头

1.本系列文章的理解水平建立在编译原理,c语言,python语言的了解基础上
2.如果不知道Scaner,Parser,AST[抽象语法树],compilerCode Evaluator建议进修
3.

架构图





1.Scaner--[token]--->Parser--[AST]-->Compiler--[byte code]-->Code Evaluator
2.Parser         use      Object/Type Structure
3.Compiler       use      memory Allocator
4.Code Evaluator modify   current state of python

结构剖析

1. [./include] C/C++编写python模块的头文件源
2. [./Lib] python自带标准库#速度慢
3. [./Module] c编写#速度快
4. [./Parser] Scaner+parser+some tools
5. [./Objects] Python所有内建对象+运行时的对象实现
6. [./python] **运行核心** Compiler+Evaluator
7. [./PcBuild] windows工程文件

编译安装

调用c函数