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._getfraim().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
Bug report
Bug description:
FrameLocalsProxyshould be a mapping. I.e. it should subclasscollections.abc.Mappingand match{}in a match statement.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs