frozendict implements the Mapping ABC and has almost the same interface as dict (differences with dict are listed in the dedicated section). dict is a superset of Mapping. The interface is defined by the Specification section.
frozendict has no __ior__() (a |= b) method, but implements __or__() (a | b). Python implements a |= b for frozendict. It’s the same as:
class MyClass:
def __init__(self, value):
self.value = value
def __or__(self, other):
return MyClass(self.value | other)
a = MyClass(1)
a |= 2
print(a.value) # output: 3
frozendict[str, list[int]] is a valid frozendict. Why would it raise an exception? Or do you expect a linter to emit a warning/error on hash(x)?
It can be easily added after PEP 814 implementation. IMO the PEP doesn’t have to cover the full scope of all possible frozendict usages. typing.TypedDict was already discussed earlier.