Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
new_user_final
89 days ago
|
parent
|
context
|
favorite
| on:
Discussion: Reduce error handling boilerplate in G...
As I have pointed in in my other comment, you can use following syntax in python, ugly but better than multiple and (I don't use python anymore)
if dict.get('key', {}).get('key-nested',{}).get....:
jon_richards
89 days ago
[–]
Even less pretty for getattr. And then you have a rude awakening about the difference between the missing default behavior of these two functions.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: