Title: Support frozendict in various builtins · Issue #145118 · python/cpython · GitHub
Open Graph Title: Support frozendict in various builtins · Issue #145118 · python/cpython
X Title: Support frozendict in various builtins · Issue #145118 · python/cpython
Description: The type, str.maketrans, and bytes.maketrans builtins should support frozendict. The issues with exec and eval were reported in a separate issue. >>> type("MyClass", (), {"x": 10})
Open Graph Description: The type, str.maketrans, and bytes.maketrans builtins should support frozendict. The issues with exec and eval were reported in a separate issue. >>> type("MyClass", (), {"x": 10}) X Description: The type, str.maketrans, and bytes.maketrans builtins should support frozendict. The issues with exec and eval were reported in a separate issue. >>> type("MyClass", (), {"x...
Opengraph URL: https://github.com/python/cpython/issues/145118
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support frozendict in various builtins","articleBody":"The `type`, `str.maketrans`, and `bytes.maketrans` builtins should support `frozendict`. The issues with `exec` and `eval` were reported in a separate issue.\n\n```python\n\u003e\u003e\u003e type(\"MyClass\", (), {\"x\": 10})\n\u003cclass '__main__.MyClass'\u003e\n \n\u003e\u003e\u003e type(\"MyClass\", (), frozendict({\"x\": 10}))\nTraceback (most recent call last):\n File \"\u003cpyshell#30\u003e\", line 1, in \u003cmodule\u003e\n MyClass = type(\"MyClass\", (), frozendict({\"x\": 10}))\nTypeError: type.__new__() argument 3 must be dict, not frozendict\n\n\u003e\u003e\u003e str.maketrans(dict({'a': 'A'}))\n{97: 'A'}\n\n\u003e\u003e\u003e str.maketrans(frozendict({'a': 'A'}))\nTraceback (most recent call last):\n File \"\u003cpyshell#23\u003e\", line 1, in \u003cmodule\u003e\n str.maketrans(frozendict({'a': 'A'}))\nTypeError: if you give only one argument to maketrans it must be a dict\n```\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-145124\n* gh-145129\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/rhettinger","@type":"Person","name":"rhettinger"},"datePublished":"2026-02-22T15:37:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/145118/cpython/issues/145118"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:05b1e657-a080-8633-4089-79a301b41738 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id B7EA:1C4F37:269EECD:35DCC12:6A50C900 html-safe-nonce 113420c7de21271093317dc4e74780d972d5408f7e23b4e2407bb4215ae31a2c visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0VBOjFDNEYzNzoyNjlFRUNEOjM1RENDMTI6NkE1MEM5MDAiLCJ2aXNpdG9yX2lkIjoiMTg1Mzc2NDczOTIxOTM3NjM4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac 435e959e9370a9f080257a2bebb6066ac470559f376a0f7a01a5bd9ff8d70252 hovercard-subject-tag issue:3974838840 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/145118/issue_layout twitter:image https://opengraph.githubassets.com/1e6b12bbceaaffdae89a13c0de3865da6329661dca1ccda25ac6da0f100efe40/python/cpython/issues/145118 twitter:card summary_large_image og:image https://opengraph.githubassets.com/1e6b12bbceaaffdae89a13c0de3865da6329661dca1ccda25ac6da0f100efe40/python/cpython/issues/145118 og:image:alt The type, str.maketrans, and bytes.maketrans builtins should support frozendict. The issues with exec and eval were reported in a separate issue. >>> type("MyClass", (), {"x": 10}) og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username rhettinger hostname github.com expected-hostname github.com None 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 turbo-cache-control no-preview go-import github.com/python/cpython git https://github.com/python/cpython.git octolytics-dimension-user_id 1525981 octolytics-dimension-user_login python octolytics-dimension-repository_id 81598961 octolytics-dimension-repository_nwo python/cpython octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 81598961 octolytics-dimension-repository_network_root_nwo python/cpython turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 08e79d53fc070870d5b168356afebb1e286a2ffe ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.