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 — PEP 416: Add a builtin frozendict type · Issue #58370 · python/cpython

PEP 416: Add a builtin frozendict type #58370

New issue
Copy link
New issue
Copy link
Closed
Closed
PEP 416: Add a builtin frozendict type#58370
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

Description

@vstinner
vstinner
opened on Feb 29, 2012
Issue body actions
BPO 14162
Nosy @vstinner
Files
  • frozendict.patch
  • frozendict_builtins.patch
  • type_final.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-03-26.20:22:50.839>
    created_at = <Date 2012-02-29.18:05:03.872>
    labels = ['interpreter-core', 'type-feature']
    title = 'PEP 416: Add a builtin frozendict type'
    updated_at = <Date 2012-03-26.20:22:50.837>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2012-03-26.20:22:50.837>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-03-26.20:22:50.839>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2012-02-29.18:05:03.872>
    creator = 'vstinner'
    dependencies = []
    files = ['24685', '24690', '24696']
    hgrepos = []
    issue_num = 14162
    keywords = ['patch']
    message_count = 5.0
    messages = ['154655', '154656', '154670', '154690', '156866']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue14162'
    versions = ['Python 3.3']

    Linked PRs

    • gh-141510 Update mapping methods in abstract.c to accept frozendict #150692
    • gh-141510 Document and test frozendict class matching behaviour #150799

    Activity

    1. vstinner commented on Feb 29, 2012

      @vstinner
      vstinner
      on Feb 29, 2012
      MemberAuthor
      More actions

      Patch to implement the PEP-416.

    2. vstinner
      added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      type-featureA feature request or enhancementA feature request or enhancement
      on Feb 29, 2012
    3. vstinner commented on Feb 29, 2012

      @vstinner
      vstinner
      on Feb 29, 2012
      MemberAuthor
      More actions

      There is no documentation update yet.

    4. vstinner commented on Mar 1, 2012

      @vstinner
      vstinner
      on Mar 1, 2012
      MemberAuthor
      More actions

      frozendict_builtins.patch: make CPython supports frozendict for the __builtins__ mapping. It is an example of frozendict usage which helps my pysandbox project.

    5. vstinner
      changed the title [-]Implementation of the PEP 416 (Add a builtin frozendict type)[/-] [+]PEP 416: Add a builtin frozendict type[/+] on Mar 1, 2012
    6. vstinner commented on Mar 1, 2012

      @vstinner
      vstinner
      on Mar 1, 2012
      MemberAuthor
      More actions

      Another frozendict usage example: freeze the dict of a new type if it contains __final__ in its namespace.

      Example:

      >>> class Classic:
      ...     pass
      ... 
      >>> Classic.attr=1
      >>> class FinalizedType:
      ...     __final__=True
      ... 
      >>> FinalizedType.attr=1
      (...)
      TypeError: 'frozendict' object does not support item assignment

      This patch is not part of the PEP-416 and is just a proof-of-concept.

    7. vstinner commented on Mar 26, 2012

      @vstinner
      vstinner
      on Mar 26, 2012
      MemberAuthor
      More actions

      The PEP has been rejected. See issue bpo-14386 for a new mappingview type.

    8. vstinner
      closed this as completedon Mar 26, 2012
    9. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    10. da-woods
      added a commit that references this issue on Jun 2, 2026

      pythongh-58370 Document and test frozendict class matching behaviour

      091478e
    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

      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402520 — 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.