About Four Spaces

Four Spaces is an independent English-language publication about Python style and good coding practice: what PEP 8 and related guides actually say, how linters and formatters apply them, and how to write code that the next person can read. It is written for students, self-taught developers and working programmers who want the reasons behind the rules.

What we publish

The style checker

The checker on the home page is a small JavaScript program written for this site. It reimplements a documented subset of the checks of pycodestyle, the reference PEP 8 checker maintained by the Python Code Quality Authority (PyCQA), and reports the same codes. It runs entirely in your browser: the code you paste or open is never sent to a server. It does not replace pycodestyle, flake8 or ruff, and the home page lists what it does and does not check.

How articles are researched

Independence

Four Spaces sells nothing, has no affiliate links, accepts no sponsored content and is not connected to the Python Software Foundation, the PyCQA or any of the projects and companies whose tools it describes. Publisher details are on the legal notice page.

About this domain

The domain pep8online.com previously hosted "PEP8 online", a free web tool, created by an independent developer and first archived in 2012, that checked pasted or uploaded Python code against PEP 8 using the pep8 module (the checker that was renamed pycodestyle in 2016), with an option to share results by link. Archived copies show the tool online until at least September 2022; later captures of the domain show parking pages. Four Spaces is a new, separate publication: it has no connection with the former tool or its author, and it has not reused any of the former site's text, code, logo or design. Because other websites still link to this domain, the old checker's addresses now lead to the new checker on the home page.

Contact and corrections

Spotted a PEP 8 rule we misread, or a tool option that has changed since we wrote about it? The contact page explains how to tell us.