Sitemap
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.

Terris Linenbach
Terris Linenbach

Written by Terris Linenbach

Coder since 1980. Always seeking the Best Way. CV: https://terris.com/cv

No responses yet