{"id":19653338,"url":"https://github.com/rainyear/cpython-internals-lecture-notes","last_synced_at":"2025-04-28T17:31:32.499Z","repository":{"id":59168049,"uuid":"98721168","full_name":"rainyear/CPython-Internals-Lecture-Notes","owner":"rainyear","description":"CPython Internals 学习笔记","archived":false,"fork":false,"pushed_at":"2017-10-11T13:59:32.000Z","size":4767,"stargazers_count":114,"open_issues_count":0,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-11-07T20:18:13.322Z","etag":null,"topics":["lecture-notes","python3"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rainyear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-29T09:01:33.000Z","updated_at":"2023-09-09T03:46:16.000Z","dependencies_parsed_at":"2022-09-12T21:14:01.129Z","dependency_job_id":null,"html_url":"https://github.com/rainyear/CPython-Internals-Lecture-Notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainyear%2FCPython-Internals-Lecture-Notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainyear%2FCPython-Internals-Lecture-Notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainyear%2FCPython-Internals-Lecture-Notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainyear%2FCPython-Internals-Lecture-Notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rainyear","download_url":"https://codeload.github.com/rainyear/CPython-Internals-Lecture-Notes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224124783,"owners_count":17259746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lecture-notes","python3"],"created_at":"2024-11-11T15:13:54.246Z","updated_at":"2024-11-11T15:13:54.541Z","avatar_url":"https://github.com/rainyear.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"十小时学习 CPython 3.6 内部实现\n===\n\n![](cover.png)\n\n---\n\nPython 的官方实现版本 CPython 是 C 语言实现的，对于想要深入学习 Python 实现过程的人来说（比如说我），缺少时效性强的指导手册。有一本 08 年出版的《Python 源码剖析》，算是影响力最大的一本了，但是也已经比较久远了。而且现在 Python 已经发布到 3.6.2 版本了，与 Python 2.x 在很多地方已经存在相当大的差异。\n\n除此之外，网上还有一份公开课，是 [Python Tutor - Visualize Python, Java, JavaScript, TypeScript, Ruby, C, and C++ code execution](http://www.pythontutor.com/) 的作者 [Philip Guo](http://www.pgbovine.net/) 2014 年所授课程 CSC 253 中的一部分：[CPython internals: A ten-hour codewalk through the Python interpreter source code](http://pgbovine.net/cpython-internals.htm)。本课程以 CPython 2.7.8 为例，共分为九节课，深入浅出地介绍了 CPython 的内部实现机制。根据本课程，前后花了大概十个小时的时间，我试着探索、学习了 CPython 3.6.1 的源码。我将每节课学习、探索的笔记整合起来，制作了这一本《CPython Internals 学习笔记》，开源分享至 [GitHub - rainyear/CPython-Internals-Lecture-Notes: CPython Internals 学习笔记](https://github.com/rainyear/CPython-Internals-Lecture-Notes)。\n\n需要注意的是，并不是说你看完了这门课程就可以大刀阔斧地自己修改 CPython 的源码并重新编译一下用到生产环境中，如果你真的有改进 Python 的好想法，应该提出新的 [PEP](https://www.python.org/dev/peps/) 并提交 Commit。\n\n欢迎分享、转载本书，但请务必保留对本项目的引用（[GitHub - rainyear/CPython-Internals-Lecture-Notes: CPython Internals 学习笔记](https://github.com/rainyear/CPython-Internals-Lecture-Notes)），且不得用于任何商业用途。如有任何疑问、意见，欢迎提交 [Issue](https://github.com/rainyear/CPython-Internals-Lecture-Notes/issues) 或发送邮件联系我！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainyear%2Fcpython-internals-lecture-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainyear%2Fcpython-internals-lecture-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainyear%2Fcpython-internals-lecture-notes/lists"}