Skip to content

Commit 2700f16

Browse files
committed
docs: rewrite Part 2 built-in objects — deeper, source-accurate, fully illustrated
Rewrite the object / integer / list / dict / set chapters to be more 深入浅出 for Python engineers new to CPython internals: open each concept from familiar Python behaviour, then dive into the C, verifying every source claim against the local CPython v3.7.0 checkout. - add a per-operation SVG diagram for list (append/insert/resize/remove), dict (create/insert/lookup, combined-vs-split) and set (remove/resize) - Chinese-ize the List/Dict/Set chapter titles and unify the section heading style to「<对象>的<操作>」 - fix factual issues: PyNumberMethods field order; _PyObject_HEAD_EXTRA is the Py_TRACE_REFS debug refchain (not the cyclic GC); the set probe example key; and replace fabricated big-int output with real values - relabel the object-category diagram in Chinese; fix the set insert diagram; correct the two swapped stub chapter titles
1 parent c8cbb32 commit 2700f16

21 files changed

Lines changed: 1393 additions & 1912 deletions

File tree

.vitepress/config.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export default defineConfig({
5050
{ text: 'Python 对象初探', link: '/objects/object/' },
5151
{ text: 'Python 整数对象', link: '/objects/long-object/' },
5252
{ text: 'Python 字符串对象', link: '/objects/str-object/' },
53-
{ text: 'Python List 对象', link: '/objects/list-object/' },
54-
{ text: 'Python Dict 对象', link: '/objects/dict-object/' },
55-
{ text: 'Python Set 对象', link: '/objects/set-object/' },
53+
{ text: 'Python 列表对象', link: '/objects/list-object/' },
54+
{ text: 'Python 字典对象', link: '/objects/dict-object/' },
55+
{ text: 'Python 集合对象', link: '/objects/set-object/' },
5656
{ text: '实现简版 Python', link: '/objects/simple-interpreter/' }
5757
]
5858
},

index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
- [ ] Python 内建对象
1919
- [x] Python 对象初探
2020
- [x] Python 整数对象
21-
- [ ] Python 字符串 对象
22-
- [x] Python List 对象
23-
- [x] Python Dict 对象
24-
- [x] Python Set 对象
21+
- [ ] Python 字符串对象
22+
- [x] Python 列表对象
23+
- [x] Python 字典对象
24+
- [x] Python 集合对象
2525
- [ ] 实现简版 Python
2626
- [ ] Python 虚拟机
2727
- [ ] Python 编译结果
Lines changed: 32 additions & 0 deletions
Loading
Lines changed: 52 additions & 0 deletions
Loading
Lines changed: 54 additions & 0 deletions
Loading
Lines changed: 69 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)