Skip to content

Style guide: boolean or Boolean? #129

Description

@hugovk

This came up at python/cpython#123845 (review).

We're not consistent in writing it upper or lower case. A rough search shows it's about 50-50:

❯ rg -s "\bboolean\b" Doc | wc -l
      87

❯ rg -s "\bBoolean\b" Doc | wc -l
      78

Shall we pick something and put it in our style guide?


Looking at some other tech style guides, it's not clear cut.

Google says:

In most contexts, boolean refers to a specific data type in a specific programming language. In such cases, use code font and the exact spelling and capitalization of the programming keyword.

When referring to the abstract data type, use lowercase.

If you refer to Boolean mathematics or Boolean logic, use uppercase.

Microsoft says:

Always capitalize.

Red Hat says:

Boolean. Correct. Named after George Boole, who first developed the concept.

According to the IBM Style Guide, it is acceptable to use "boolean" (lowercase) in API programming information when it refers to a primitive return type.

Apple says:

Boolean (adj.)
Note capitalization.

Activity

  1. nedbat commented on Sep 10, 2024

    @nedbat
    Member

    I like the Google guidance. Capitalizing it all the time seems pedantic and distracting. English is full of eponyms that are not capitalized.

  2. hugovk commented on Aug 15, 2025

    @hugovk
    MemberAuthor

    Please see PR python/devguide#1636.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions