1 min readDec 31, 2019
Catching KeyError is more Pythonic than using get and looking for undef. This pattern that I call “try — don’t check” is why an else block can follow a catch block.
Catching KeyError is more Pythonic than using get and looking for undef. This pattern that I call “try — don’t check” is why an else block can follow a catch block.
Coder since 1980. Always seeking the Best Way. CV: https://terris.com/cv