The x if y else z syntax is a feature of Python 2.5. Trac 0.11 require Python >= 2.3, while Trac 0.12 require Python >= 2.4. The syntax should not be used for any plugin version or branch that still target these two major versions.
The old equivalent is:
value = value in('true','yes',True)and1or0
Log shows 2 places using this syntax, but the second line is not complete so I cannot offer an alternative for that. Obviously same problem though.