[Raymond Hettinger] > Arghh. One more example always arises after going to bed. > > The original required only equality. The new version requires > equality, hashability, *and* weak referencability. It always required (and still does) all three for __setitem__ and __getitem__: key equality and hashability are required for all dicts, and *of course* key weak referencability is required for a weak-keyed dict: that's why it's called a weak-keyed dict <0.5 wink>. __delitem__ alone used a bizarre algorithm, and indeed one that broke other normal dict invariants such as that del d[k] always deletes the same (key, value) pair that d[k] = v would have replaced.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4