From @khandelwal "It's not very Pythonic to put if-else statements all on one line like this. Please expand these out."
They had previously been one line.

Just learned this from CM. Done.