-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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
Eclips4
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error