FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

FrameLocalsProxy is not a mapping · Issue #120097 · python/cpython · GitHub

Repository navigation

FrameLocalsProxy is not a mapping #120097

Closed
Closed

Description

Bug report

Bug description:

FrameLocalsProxy should be a mapping. I.e. it should subclass collections.abc.Mapping and match {} in a match statement.

from collections.abc import Mapping
import sys

def f():
    return sys._getframe().f_locals

proxy = f()

assert(instance(proxy, Mapping))

match proxy:
    case {}:
        kind = "mapping"
    case _:
        kind = "other"

assert(kind == "mapping")

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    3.13only security fixes
    3.14bugs and security fixes
    on Jun 5, 2024
  2. self-assigned this
    on Jun 5, 2024
  3. added a commit that references this issue on Jun 19, 2024
  4. added a commit that references this issue on Jun 19, 2024
  5. added a commit that references this issue on Jun 30, 2024
  6. added a commit that references this issue on Jul 11, 2024
  7. added a commit that references this issue on Jul 17, 2024
  8. added a commit that references this issue on Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.13only security fixes3.14bugs and security fixestype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL