Multi-conditional judgement

Hi,

I am having problems with multi-conditional judgement.
When T0>T00 and T0>T_m, kappa_B equals kap_P, if neither condition holds then kappa_B equals kap_B.

My code:
kappa_B.assign(project(kap_B, Vp, solver_type=“mumps”, form_compiler_parameters={“cpp_optimize”: True, “representation”: “uflacs”, “quadrature_degree”: 1}))
But there is a problem:
Traceback (most recent call last):
File “/home/studie9.py”, line 851, in
kappa_S.assign(project(conditional(((T0 > T00) & (T0 > T_m)), kap_P, kap_B), Vp, solver_type=“mumps”, form_compiler_parameters={“cpp_optimize”: True, “representation”: “uflacs”, “quadrature_degree”: 1}))
TypeError: unsupported operand type(s) for &: ‘GT’ and ‘GT’

I have also try to use C++ syntax (condition ? true_value: false_value)
But there is also a problem:
File “/home/studie9.py”, line 851
kappa_S.assign(project(conditional(((T0>T00) and (T0>T_m))? kap_P : kap_B), Vp, solver_type=“mumps”, form_compiler_parameters={“cpp_optimize”: True, “representation”: “uflacs”, “quadrature_degree”: 1}))
^
SyntaxError: invalid syntax
? is said to be an invalid syntax.

Does anyone know what I should do to correct this?
thanks in advance!

Please follow the guidelines in: Read before posting: How do I get my question answered? and supply a minimal example illustrating your issue.