Y
Hacker News
new
|
ask
|
show
|
jobs
by
detaro
2641 days ago
dict.get() does the same in Python (optional second parameter for a default value). But I've wondered too why there isn't a form of the default dict that can take parameters like the key for the factory function.