>
> All of that kind of adds up to make it a distraction that's likely worse
> than a dict subclass with __setitem__ overridden (if that's the
> behaviour you want). It's a fantastic data structure for when you need
> it, but it's one that deserves to be researched and understood before
> simply dr
11:48 AM, zhang kai wrote:
> > Thanks Victor and Pablo. I will check the discussion of PEP 603. It's a
> > little weird to use the immutables library when it's code in already in
> > CPython but I'm glad it's an option.
>
> The main difference is that 'imm
PEP 603, which more or less proposes this (the
> author of the pep is the author of the HAMT code)
> check https://peps.python.org/pep-0603/
>
> Alternatively, there is already a pypi package with this code:
>
> https://pypi.org/project/immutables/
>
> Regards from cloudy Lond
Hi,
HAMT is a very useful immutable mapping type. Currently CPython use it
internally to implement contextvar. Considering immutable data structure is
very useful I hope we can make it available to python script(maybe via
collections module).
Immutable data structures are fundamental parts of