Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
codebje
· 3y ago · 0 comments
It's probably subjective, but I don't see the need to wrap your code in a try/except block as an improvement over an optional sum type, and I really don't see the use of a magic value to indicate no value as an improvement over anything.
Comments
[–]
bombolo
3y ago
If it's not a try it's an if... you still need to handle the case where the key wasn't present and figure something out.