FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

cpython/InternalDocs/structure.md at main · python/cpython · GitHub

/ cpython Public

Latest commit

 

History

History
40 lines (27 loc) · 1.28 KB

File metadata and controls

40 lines (27 loc) · 1.28 KB

CPython source code

This section gives an overview of CPython's code structure and provides a summary of file locations for modules and built-ins.

Source code layout

For a Python module, the typical layout is:

  • Lib/<module>.py
  • Modules/_<module>.c (if there's also a C accelerator module)
  • Lib/test/test_<module>.py
  • Doc/library/<module>.rst

For an extension module, the typical layout is:

  • Modules/<module>module.c
  • Lib/test/test_<module>.py
  • Doc/library/<module>.rst

For builtin types, the typical layout is:

For builtin functions, the typical layout is:

Some exceptions to these layouts are:


Back | FazBrowse Home | New Git URL