by code_biologist · 3y ago · 0 comments
try:
value = data["foo"]["bar"]["baz"]
except KeyError:
value = NoneUsing errors as general flow control makes me uncomfortable. It shouldn't be an error or exception except in.... Actual problems.