3 ms·
It baffles me that the PEP to add frozendict is still in draft state. It's obnoxious to try and create truly immutable datatypes in Python for... I have no idea
by packetlost 4y ago
It baffles me that the PEP to add frozendict is still in draft state. It's obnoxious to try and create truly immutable datatypes in Python for... I have no idea why.
- dragonwriter 4y agofrozendict (PEP 416) isn’t in draft, it is rejected frozenmap (PEP 603) is in draft.
- packetlost 4y agoAh right, I'm not sure how they're significantly different. Regardless, not having a immutable dictionary-type is just... frustrating.
- andelink 4y agoI’ve used types.MappingProxyType on occasion for this
- packetlost 4y agoThat's ultimately what I ended up using, but it seems not ideal considering the underlying data is still mutable and you still have to maintain a reference to it somewhere to prevent GC