Skip to content

Docs: grammar in Counter dictionary methods note is slightly unclear #148883

@SanJJ1

Description

@SanJJ1

Documentation

In Doc/library/collections.rst, the sentence that introduces the two Counter-specific method overrides reads:

The usual dictionary methods are available for Counter objects except for two which work differently for counters.

This sentence ends with a period, but the two methods it refers to (fromkeys and update) are defined immediately below it. Because the sentence doesn't introduce them as a list, the connection to the following entries is easy to miss on a first read.

Suggested change

The usual dictionary methods are available for Counter objects except for these two which work differently for counters:

Adding "these" makes the reference concrete, and changing the period to a colon makes the following fromkeys/update entries read as the list being introduced.

PR: #148882

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions