GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — frozendict is not mentioned in Doc/reference/expressions.rst · Issue #161608 · python/cpython

frozendict is not mentioned in Doc/reference/expressions.rst #161608

New issue
Copy link
New issue
Copy link
Open
Open
frozendict is not mentioned in Doc/reference/expressions.rst#161608
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@dluschan
dluschan
opened on Nov 8, 2026
Issue body actions

Documentation

frozendict was added as a built-in type in 3.15 (PEP 814) and is documented in
the data model ("Frozen dictionaries" in Doc/reference/datamodel.rst), but
Doc/reference/expressions.rst still lists only dict wherever it enumerates
built-in mapping types. Three places seem to need an update:

  1. "Value comparisons", the bullet about mappings:

    Mappings (instances of :class:dict) compare equal if and only if they have
    equal (key, value) pairs. [...]

    frozendict is not a subclass of dict, so it is not covered by "instances of
    dict", yet it follows the same rules, and the two types compare equal to each
    other:

    dict(a=1, b=2) == frozendict(a=1, b=2)
    True

    Suggested: "Mappings (instances of :class:dict or :class:frozendict)
    compare equal if and only if they have equal (key, value) pairs."
    The following sentence about order comparisons raising TypeError applies to
    frozendict as well.

  2. "Membership test operations":

    For container types such as list, tuple, set, frozenset, dict, or
    collections.deque, the expression x in y is equivalent to
    any(x is e or x == e for e in y).

    Suggested: add frozendict to the list.

  3. "Boolean operations", the list of values interpreted as false:

    [...] and empty strings and containers (including strings, tuples, lists,
    dictionaries, sets and frozensets).

    Suggested: add "frozendicts" (an empty frozendict is false like any other
    empty container).

Minor, optional: the section "Binary arithmetic operations" says that some of
these operations apply to non-numeric types, but only describes numbers and
sequences. The - operator on sets (difference) and | on dicts are not
mentioned there (they are documented with the types themselves).

Linked PRs

  • gh-161608: Mention frozendict in the expressions reference #161612

Activity

  1. dluschan
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Nov 8, 2026
  2. github-project-automation
    added this to docs issueson Nov 8, 2026
  3. github-project-automation
    moved this to Todo in docs issueson Nov 8, 2026
  4. nilayp-codes commented on Nov 8, 2026

    @nilayp-codes
    nilayp-codes
    on Nov 8, 2026
    More actions

    I'd like to work on this. I checked current main: the three spots are lines 2177, 2258 and 2329 of Doc/reference/expressions.rst, and :class:frozendict resolves to the entry in Doc/builtins/stdtypes.rst. I'll keep the PR to those three edits and leave the optional arithmetic-operators note for a separate issue.

    Reacted by Bartosz Sławecki and sobolevn
  5. nilayp-codes
    added a commit that references this issue on Nov 8, 2026

    pythongh-161608: Mention frozendict in the expressions reference

    40ed329
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

    docsDocumentation in the Doc dirDocumentation in the Doc dir

    Projects

    • docs issues
      Status
      Todo
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.