Comment Comment by kbsletten To be fair, getValueOrDefault is strictly more powerful than defaultdict because you can vary the initial value by the key. parent kbsletten 7 years ago