python/cpython has 1,654,096 source lines of code out of 2,210,231 total lines across 3,403 files, counted with tokei from the main ref at commit 585755d87aa5 on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.
As of 2026-11-16 (commit 585755d87aa5), python/cpython contains 2,210,231 total lines: 1,654,096 code, 243,601 comments, 312,534 blank, across 3,403 files in 36 languages (top language: C 31.1%). Canonical public options (tests, docs and generated files excluded). Counted with tokei via OctoCounts.
OctoCounts produced this report by resolving python/cpython to commit 585755d87aa5, downloading the repository source archive, and counting files selected by the effective rules 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; an exact reproduction needs the same commit, engine version, and effective counting rules.
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 486 code lines per file. C accounts for 31.1% of counted code.
| Language | Files | Lines | Code | Comments | Blanks |
|---|---|---|---|---|---|
| C | 491 | 666165 | 514923 | 85217 | 66025 |
| ReStructuredText | 747 | 536378 | 381208 | 0 | 155170 |
| Python | 1039 | 435396 | 352569 | 32282 | 50545 |
| C Header | 663 | 387556 | 335023 | 19159 | 33374 |
| XML | 61 | 31375 | 31294 | 18 | 63 |
| Visual Studio Project | 54 | 7837 | 7790 | 9 | 38 |
| Autoconf | 19 | 7199 | 4523 | 1411 | 1265 |
| TOML | 9 | 4155 | 3712 | 183 | 260 |
| JavaScript | 17 | 4472 | 3563 | 382 | 527 |
| HTML | 18 | 3709 | 3464 | 55 | 190 |
| CSS | 7 | 4046 | 3216 | 247 | 583 |
| JSON | 17 | 3174 | 3171 | 0 | 3 |
Top language: C 31.1%. Generated on .
python/cpython: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.
python/cpython has 1,654,096 lines of code, plus 243,601 comment lines and 312,534 blank lines, for 2,210,231 total lines at commit 585755d87aa5 on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.
OctoCounts resolved the public GitHub repository to commit 585755d87aa5, 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 585755d87aa5 on November 16, 2026.
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,654,096 code lines across 36 languages, counted by tokei.