Skip to content

Commit c27e3cd

Browse files
committed
新增「一般表达式与名字空间」章节
讲解取名字的编译期选指令与运行期查空间:LOAD_FAST/LOAD_GLOBAL/LOAD_NAME 与 LEGB,以及表达式在求值栈上的运算与优先级体现
1 parent 2a246bb commit c27e3cd

10 files changed

Lines changed: 525 additions & 3 deletions

File tree

.vitepress/config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export default defineConfig({
7171
text: '第 4 部分:虚拟机',
7272
items: [
7373
{ text: 'Python 虚拟机框架(帧对象与求值循环)', link: '/vm/frame-and-eval-loop/' },
74-
{ text: '一般表达式与名字空间(编写中…)', link: '/' }
74+
{ text: '一般表达式与名字空间', link: '/vm/expressions-and-names/' },
75+
{ text: '控制流:跳转、循环与迭代器(编写中…)', link: '/' }
7576
]
7677
},
7778
{

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
## 第 4 部分:虚拟机
3131

3232
- [Python 虚拟机框架(帧对象与求值循环)](vm/frame-and-eval-loop/index.md)
33-
- 一般表达式与名字空间
33+
- [一般表达式与名字空间](vm/expressions-and-names/index.md)
3434
- 控制流:跳转、循环与迭代器
3535
- 异常机制:block 栈与栈展开
3636
- 函数机制:调用、参数与闭包

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
- [x] 编译的产物:code object 与 pyc
3232
- [ ] 第 4 部分:虚拟机
3333
- [x] Python 虚拟机框架(帧对象与求值循环)
34-
- [ ] 一般表达式与名字空间
34+
- [x] 一般表达式与名字空间
3535
- [ ] 控制流:跳转、循环与迭代器
3636
- [ ] 异常机制:block 栈与栈展开
3737
- [ ] 函数机制:调用、参数与闭包
Lines changed: 43 additions & 0 deletions
Loading
Lines changed: 60 additions & 0 deletions
Loading
Lines changed: 47 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)