Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
koenigdavidmj
on April 22, 2010
|
parent
|
context
|
favorite
| on:
Python IAQ: Infrequently Answered Questions
You can also say a_dict.setdefault(key, default) which is like a_dict.get(key, default) but will also do a_dict[key]=default if there does not already exist a value for key.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: