|
|
|
|
|
by b33j0r
993 days ago
|
|
Well, who hasn’t used that classic datastructure `dictstack` (and famously the dict.pop operation)? At first I was kinda giggling. But actually there are such things, if the Mapping is also ordered. LRU cache, trees, tries… and—oh wait—all CPython dicts are ordered these days! (Honestly I have only used the modern ordered-nature of `dict` for serialization to versioned or human-editable files. But why not an algorithm with a “`stackdict`” I guess?) |
|