Python source code analysis
Introduction
Catalogue of works
Chapter 0 Python Source Code Analysis -- Compiling Python 0.1 Python overall architecture 0.2 Python source code organization 0.3 Compiling Python in Windows 0.4 Compiling Python in Unix/Linux 0.5 Modify Python source code 0.6 The road to Python 0.7 Some precautions Part 1 Python Built in Objects Chapter 1 Preliminary Exploration of Python Objects 1.1 Objects in Python 1.2 Type objects 1.3 Polymorphism of Python objects 1.4 Reference counting 1.5 Classification of Python objects Chapter 2 Integer Objects in Python 2.1 Getting to know PyIntObject objects 2.2 Creation and maintenance of PyIntObject objects 2.3 Hack PyIntObject Chapter 3 String Objects in Python 3.1 PyStringObject and PyString_Type 3.2 Creating PyStringObject Objects 3.3 Inter mechanism of string objects 3.4 Character buffer pool 3.5 PyStringObject efficiency related issues 3.6 Hack PyStringObject Chapter 4 List Objects in Python 4.1 PyListObject object 4.2 Creation and Maintenance of PyListObject Object 4.3 PyListObject Object Buffer Pool 4.4 Hack PyListObject Chapter 5 Dict Objects in Python 5.1 Overview of hash table 5.2 PyDictObject 5.3 Creation and maintenance of PyDictObject 5.4 PyDictObject Object Buffer Pool 5.5 Hack PyDictObject Chapter 6 The simplest Python simulation - Small Python 6.1 Small Python 6.2 Object mechanism 6.3 Interpretation process 6.4 Interactive environment Part 2 Python Virtual Machine Chapter 7 Python Compilation Results - Code Object and Pyc File 7.1 Execution process of Python program 7.2 Compilation result of Python compiler -- PyCodeObject object 7.3 Generation of Pyc files 7.4 Python bytecode 7.5 Parsing pyc files Chapter 8 Python Virtual Machine Framework 8.1 Execution environment in Python virtual machine 8.2 Name, Scope and Namespace 8.3 Running framework of Python virtual machine 8.4 Python runtime environment Chapter 9 General Expression in Python Virtual Machine 9.1 Creation of simple built-in objects 9.2 Creation of Complex Built in Objects 9.3 Other general expressions Chapter 10 Control Flow in Python Virtual Machine 10.1 If control flow in Python virtual machine 10.2 For loop control flow in Python virtual machine 10.3 While loop control structure in Python virtual machine 10.4 Exception control flow in Python virtual machine Chapter 11 Function Mechanism in Python Virtual Machine 11.1 PyFunctionObject object 11.2 Function call without parameters 11.3 Namespace during function execution 11.4 Implementation of function parameters 11.5 Access to local variables in functions 11.6 Nested functions, closures, and decorators Chapter 12 Class Mechanism in Python Virtual Machine 12.1 Object model in Python 12.2 From type object to class object 12.3 User defined class 12.4 From class object to instance object 12.5 Accessing the attributes in the instance object 12.6 The ever-changing descriptor Chapter 13 Initialization of Python Running Environment 13.1 Thread Environment Initialization 13.2 Initialization of system module 13.3 Activate Python virtual machine Chapter 14 Dynamic Loading Mechanism of Python Modules 14.1 Prelude to import 14.2 Black box detection of import mechanism in Python 14.3 Implementation of import mechanism 14.4 Import operation in Python 14.5 Module related namespaces Chapter 15 Python multithreading mechanism 15.1 GIL and thread scheduling 15.2 See Python Thread for the first time 15.3 Creation of Python thread 15.4 Scheduling of Python threads 15.5 Destruction of Python sub threads 15.6 User level mutual exclusion and synchronization of Python threads 15.7 Advanced thread library - threading Chapter 16 Python Memory Management Mechanism 16.1 Memory management architecture 16.2 Memory pool of small space 16.3 Recycling garbage collection 16.4 Garbage collection in Python