Re:PEP 584 – Add + and – operators to the built-in dict class
by zephyrfalcon on Wednesday March 06, 2019 @11:09AM
(#19319949)
Before Python grew a set type, it was common to implement them in a similar way, i.e. as a dict with some kind of default value (0, 1, None, etc).
[ Parent
| on HN ]
Re:PEP 584 – Add + and – operators to the built-in dict class
by kevin_thibedeau on Wednesday March 06, 2019 @12:45PM
(#19320887)
Python sets are internally just a dict hash table for the keys with no associated values.