python/cpython has 1,634,582 source lines of code out of 2,184,230 total lines across 3,376 files, counted from the main ref at commit 5503a5e09977 by the OctoCounts tokei engine on 2026-10-21. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.
As of 2026-10-21 (commit 5503a5e09977), python/cpython contains 2,184,230 total lines: 1,634,582 code, 240,769 comments, 308,879 blank, across 3,376 files in 36 languages (top: C 31.0%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.
OctoCounts produced this report by resolving python/cpython to commit 5503a5e09977, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.
This is a very large codebase by counted code lines. Code represents 74.8% of all lines, comments represent 11.0%, and the repository averages 484 code lines per file. C accounts for 31.0% of counted code.
| Language | Files | Lines | Code | Comments | Blanks |
|---|---|---|---|---|---|
| C | 483 | 654644 | 506240 | 83240 | 65164 |
| ReStructuredText | 802 | 529240 | 376061 | 0 | 153179 |
| Python | 1039 | 432086 | 349861 | 31899 | 50326 |
| C Header | 648 | 384208 | 332450 | 18871 | 32887 |
| XML | 61 | 31375 | 31294 | 18 | 63 |
| Visual Studio Project | 54 | 7829 | 7782 | 9 | 38 |
| Autoconf | 16 | 7061 | 4377 | 1409 | 1275 |
| TOML | 9 | 4135 | 3691 | 183 | 261 |
| JavaScript | 16 | 4427 | 3531 | 376 | 520 |
| HTML | 18 | 3709 | 3464 | 55 | 190 |
| CSS | 7 | 4046 | 3216 | 247 | 583 |
| JSON | 14 | 3125 | 3122 | 0 | 3 |
Top language (C 31.0%). Generated at .
python/cpython has 2,184,230 total lines, including 1,634,582 code lines, 240,769 comment lines, and 308,879 blank lines.
OctoCounts resolved the public GitHub repository to commit 5503a5e09977, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.
This OctoCounts report was generated from main at commit 5503a5e09977 on 2026-10-21T03:46:21.410482689+00:00.
Other public repositories with an OctoCounts report, ranked by top language and code size similarity:
Play the growth animation for python/cpython on this page — 1,634,582 code lines across 12 languages, counted by tokei.