docs.python.org favicon

9. Classes — Python 3.14.7 documentation

6
公开标注数
6
参与人数
2026-07-26 09:19:07
首次 Whisper

本页的公开 Whisper

划选高亮2026-07-26 15:43:07
原文高亮摘录
Assignments do not copy data — they just bind names to objects.
Whisper 随想笔记
So that's why my list changes when I pass it to a function and modify it inside... makes sense now.
划选高亮2026-07-26 12:40:07
原文高亮摘录
A namespace is a mapping from names to objects.
Whisper 随想笔记
Wait, so doesn't that mean functions and variables are just keys? Mind blown.
划选高亮2026-07-26 12:31:07
原文高亮摘录
A namespace is a mapping from names to objects.
Whisper 随想笔记
So basically it's just a fancy word for a dictionary, got it.
划选高亮2026-07-26 09:37:07
原文高亮摘录
Classes provide a means of bundling data and functionality together.
Whisper 随想笔记
Yeah, but the real magic is when you get to override methods and mess with state.
划选高亮2026-07-26 09:28:07
原文高亮摘录
Classes provide a means of bundling data and functionality together.
Whisper 随想笔记
That's the whole point? I thought classes were about inheritance and stuff.
划选高亮2026-07-26 09:19:07
原文高亮摘录
Classes provide a means of bundling data and functionality together.
Whisper 随想笔记
So basically it's just grouping stuff with the functions that use it, neat.

分享本页 Whisper

分享到 X
短链接
https://domwhisper.com/s/46da2dec76cb
嵌入代码
<iframe src="https://domwhisper.com/embed/46da2dec76cb" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>

看看大家在 docs.python.org 上讨论了什么

安装 DomWhisper,浏览网页时实时查看 whisper,也可以加入讨论。

获取插件