PR changes the for...append() pattern to list comprehensions where equivalent, does the same for dicts, makes exception handling slightly more specific (does not catch KeyboardInterrupt for example), uses setdefault() to replace a LBYL, and simplifies a couple of conditionals.
PR changes the
for...append()
pattern to list comprehensions where equivalent, does the same for dicts, makes exception handling slightly more specific (does not catchKeyboardInterrupt
for example), usessetdefault()
to replace a LBYL, and simplifies a couple of conditionals.