Skip to content

Commit dd45257

Browse files
Post-move final page to InternalDocs
1 parent df858ed commit dd45257

File tree

1 file changed

+2
-60
lines changed

1 file changed

+2
-60
lines changed

internals.rst

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,6 @@
44
CPython's internals
55
===================
66

7-
This guide describes the basics of CPython’s internals.
8-
It explains the layout of CPython’s source code.
9-
10-
.. _exploring:
11-
12-
CPython source code
13-
===================
14-
15-
This section gives an overview of CPython's code structure and provides
16-
a summary of file locations for modules and built-ins.
17-
18-
19-
Source code layout
20-
------------------
21-
22-
For a Python :term:`module`, the typical layout is:
23-
24-
* :file:`Lib/{<module>}.py`
25-
* :file:`Modules/_{<module>}.c` (if there's also a C accelerator module)
26-
* :file:`Lib/test/test_{<module>}.py`
27-
* :file:`Doc/library/{<module>}.rst`
28-
29-
For an :term:`extension module`, the typical layout is:
30-
31-
* :file:`Modules/{<module>}module.c`
32-
* :file:`Lib/test/test_{<module>}.py`
33-
* :file:`Doc/library/{<module>}.rst`
34-
35-
For :ref:`bltin-types`, the typical layout is:
36-
37-
* :file:`Objects/{<builtin>}object.c`
38-
* :file:`Lib/test/test_{<builtin>}.py`
39-
* :cpy-file:`Doc/library/stdtypes.rst`
40-
41-
For :ref:`built-in-funcs`, the typical layout is:
42-
43-
* :cpy-file:`Python/bltinmodule.c`
44-
* :cpy-file:`Lib/test/test_builtin.py`
45-
* :cpy-file:`Doc/library/functions.rst`
46-
47-
Some exceptions to these layouts are:
48-
49-
* built-in type ``int`` is at :cpy-file:`Objects/longobject.c`
50-
* built-in type ``str`` is at :cpy-file:`Objects/unicodeobject.c`
51-
* built-in module ``sys`` is at :cpy-file:`Python/sysmodule.c`
52-
* built-in module ``marshal`` is at :cpy-file:`Python/marshal.c`
53-
* Windows-only module ``winreg`` is at :cpy-file:`PC/winreg.c`
54-
55-
56-
Additional references
57-
---------------------
58-
597
The CPython code base is constantly changing and evolving.
608
Here's a sample of references about CPython's architecture aimed at
619
building your understanding of CPython internals and its evolution:
@@ -64,6 +12,7 @@ building your understanding of CPython internals and its evolution:
6412
:header: "Title", "Brief", "Author", "Version"
6513
:widths: 50, 50, 20, 5
6614

15+
"`CPython's InternalDocs`_", "Docs on CPython internals maintained in the source tree", "", ""
6716
"`A guide from parser to objects, observed using GDB`_", "Code walk from Parser, AST, Sym Table and Objects", Louie Lu, 3.7.a0
6817
"`Green Tree Snakes`_", "The missing Python AST docs", Thomas Kluyver, 3.6
6918
"`Yet another guided tour of CPython`_", "A guide for how CPython REPL works", Guido van Rossum, 3.5
@@ -80,6 +29,7 @@ building your understanding of CPython internals and its evolution:
8029
"`A guide from parser to objects, observed using Eclipse`_", "Code walk from Parser, AST, Sym Table and Objects", Prashanth Raghu, 2.7.12
8130
"`CPython internals: A ten-hour codewalk through the Python interpreter source code`_", "Code walk from source code to generators", Philip Guo, 2.7.8
8231

32+
.. _CPython's InternalDocs: https://github.com/python/cpython/tree/main/InternalDocs
8333

8434
.. _A guide from parser to objects, observed using GDB: https://hackmd.io/s/ByMHBMjFe
8535

@@ -100,11 +50,3 @@ building your understanding of CPython internals and its evolution:
10050
.. _A guide from parser to objects, observed using Eclipse: https://docs.google.com/document/d/1nzNN1jeNCC_bg1LADCvtTuGKvcyMskV1w8Ad2iLlwoI/
10151

10252
.. _CPython internals\: A ten-hour codewalk through the Python interpreter source code: https://www.youtube.com/playlist?list=PLzV58Zm8FuBL6OAv1Yu6AwXZrnsFbbR0S
103-
104-
105-
CPython InternalDocs
106-
====================
107-
108-
For more detailed and up-to-date documentation on CPython's internals,
109-
please refer to the `InternalDocs folder <https://github.com/python/cpython/tree/main/InternalDocs>`_
110-
in the CPython repository.

0 commit comments

Comments
 (0)