# python/cpython SLOC report

> As of 2026-09-17 (commit c39a32983728), python/cpython contains 2,170,713 total lines: 1,628,875 code, 238,163 comments, 303,675 blank, across 4,127 files in 36 languages (top: C 31.2%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

python/cpython has 1,628,875 source lines of code out of 2,170,713 total lines across 4,127 files, counted from the c39a32983728f2398bb506c20e5c162d61805da3 ref at commit c39a32983728 by the OctoCounts tokei engine on 2026-09-17. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving python/cpython to commit c39a32983728, 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.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 75.0% of all lines, comments represent 11.0%, and the repository averages 395 code lines per file. C accounts for 31.2% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 480 | 654,319 | 508,121 | 81,441 | 64,757 |
| ReStructuredText | 1,573 | 518,372 | 368,711 | 0 | 149,661 |
| Python | 1,032 | 428,008 | 346,424 | 31,608 | 49,976 |
| C Header | 641 | 386,864 | 336,034 | 18,706 | 32,124 |
| XML | 61 | 31,375 | 31,294 | 18 | 63 |
| Visual Studio Project | 54 | 7,816 | 7,770 | 8 | 38 |
| Autoconf | 16 | 7,054 | 4,378 | 1,404 | 1,272 |
| TOML | 9 | 3,982 | 3,587 | 165 | 230 |
| JavaScript | 16 | 4,427 | 3,531 | 376 | 520 |
| HTML | 18 | 3,535 | 3,295 | 53 | 187 |
| CSS | 7 | 4,046 | 3,216 | 247 | 583 |
| JSON | 14 | 3,104 | 3,101 | 0 | 3 |

Top language (C 31.2%). Generated at 2026-09-17T06:51:43.890752494+00:00. Canonical report: https://octocounts.com/github/python/cpython

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/python/cpython/commit/c39a32983728f2398bb506c20e5c162d61805da3?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does python/cpython have?

python/cpython has 2,170,713 total lines, including 1,628,875 code lines, 238,163 comment lines, and 303,675 blank lines.

### How was the python/cpython line count measured?

OctoCounts resolved the public GitHub repository to commit c39a32983728, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for python/cpython?

This OctoCounts report was generated from c39a32983728f2398bb506c20e5c162d61805da3 at commit c39a32983728 on 2026-09-17T06:51:43.890752494+00:00.

## Similar repository reports

- [FFmpeg/FFmpeg](https://octocounts.com/github/FFmpeg/FFmpeg) — C, 1,628,496 code lines
- [postgres/postgres](https://octocounts.com/github/postgres/postgres) — C, 1,630,223 code lines
- [plan9foundation/plan9](https://octocounts.com/github/plan9foundation/plan9) — C, 1,659,936 code lines
- [php/php-src](https://octocounts.com/github/php/php-src) — C, 1,793,289 code lines
- [apple-oss-distributions/xnu](https://octocounts.com/github/apple-oss-distributions/xnu) — C, 1,390,343 code lines
- [Kitware/CMake](https://octocounts.com/github/Kitware/CMake) — C, 1,254,658 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Neovim vs VS Code](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
