DEV Community

Discussion on: What’s the thing you hate the most in Python?

Collapse
 
alansolitar profile image
Alan Solitar

The lack of a standard library deep getter function / optional chaining operator bugs me a fair bit.

Collapse
 
sonnk profile image
Nguyen Kim Son

Can you elaborate more on this please?

Collapse
 
alansolitar profile image
Alan Solitar

for example:

in python there isn't really an elegant built-in way to handle getting nested dictionary values that might not exist.

i.e. my_dict['key1']['key2']['key3']