expand inline if for python 2.4

More fixes to come probably.