Skip to content

Style guide: permit "CPU"? #109

Closed
python/devguide
#1289
@hugovk

Description

@hugovk

The devguide style guide advises against using "CPU":

CPU

For “central processing unit.” Many style guides say this should be spelled out on the first use (and if you must use it, do so!). For the Python documentation, this abbreviation should be avoided since there’s no reasonable way to predict which occurrence will be the first seen by the reader. It is better to use the word “processor” instead.

But it's advice rarely followed. A quick count in the CPython docs (searching for lines with regex "\bCPUs?\b" and "\bprocessors?\b"):

  • 74 "CPU"
  • 48 "processor"

Even the devguide only managed 1 "processor", and it was in the recommendation above to use this word. Compared to 4 "CPU" (1 in the prohibition above and 3 elsewhere).

Other style guides

Well, let's see what some other style guides say.

Google:

CPU
All caps. No need to expand the abbreviation on first mention.

Red Hat:

Capitalization
Unless the acronym or initialism stands for a proper noun, use sentence case for the spelled out version: for example, "central processing unit (CPU)". Not all acronyms are capitalized (for example, "spool"); see the IBM Style Guide or another suitable reference if you are unsure.

Apple:

CPU
Abbreviation for central processing unit. Avoid in user materials; use processor to refer to the chip and use computer or system to refer to the computer itself. For guidelines about spelling out abbreviations, see abbreviations and acronyms. See also computer; processor; system.

Microsoft:

CPU not specifically mentioned or prohibited.

Bishop Fox

CPU, CPUs (n.)
Central processing unit. Do not spell out.

Archaeology

This advice was first added to the devguide by Sandro Tosi in January 2012:
python/devguide@3160c41

It was moved from "Documenting Python":

https://web.archive.org/web/20080214225803/http://docs.python.org/dev/documenting

The style guide mentioned there isn't archived, but it was originally part of the Python source. This advice was first added to the main repo by Fred Drake in July 2001:

python/cpython@9120df3

  \begin{description}
    \item[CPU]
    For ``central processing unit.''  Many style guides say this
    should be spelled out on the first use (and if you must use it,
    do so!).  For the Python documentation, this abbreviation should
    be avoided since there's no reasonable way to predict which occurance
    will be the first seen by the reader.  It is better to use the
    word ``processor'' instead.

The commit message:

Add a little more information about the usage of some terms where the style guide can use a little clarification, and present some minor specific markup.

Make a few adjustments to conform to the style guide.

I had a poke around the old Python-Dev mailing list but didn't find any mention.

So no specific reasoning for this addition.

Suggestion

I think our recommendation is outdated, and we're clearly not following it.

I think it's okay to use "CPU" without spelling out.

Shall we remove this rule, or update it somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions