Python 2.4 doesn't have ternary ifs :-(