Comment on Discussion: Reduce error handling boilerplate in Golang using '?'parentComments−nonethewiser1yYes, same experience. As someone who learned on python then got deep into Typsecript, this was a major bummer when returning to python.Its funny because when I was a beginner in both I strongly preferred python syntax. I thought it was much simpler.−new_user_final1yAs 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_richards1yEven less pretty for getattr. And then you have a rude awakening about the difference between the missing default behavior of these two functions.
Comments
Yes, same experience. As someone who learned on python then got deep into Typsecript, this was a major bummer when returning to python.
Its funny because when I was a beginner in both I strongly preferred python syntax. I thought it was much simpler.
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)
Even less pretty for getattr. And then you have a rude awakening about the difference between the missing default behavior of these two functions.