PyCON 2024 in Pittsburgh experience
I am a regular visitior of PyCON US conference since 2001 and I visited most
For a long time there was a test() method available in ZPT:
<td tal:attributes="class python: test(some_condition, 'even', 'odd')"%>
With the move to browser views the test() had gone and you had to write something like
<td tal:attributes="class python: some_condition and 'even' or 'odd')">
as a replacement. This notation may have side-effects in some rare cases.
Now with Python 2.6 or higher you can rewrite your code the following way
<td tal:attributes="class python: 'even' if some_condition else 'odd')">
in a more clean way. In addition this notation is free of side-effects.