Changes between Initial Version and Version 1 of Ticket #9146


Ignore:
Timestamp:
Sep 2, 2011, 7:23:00 AM (13 years ago)
Author:
osimons
Comment:

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) and 1 or 0

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.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9146 – Description

    initial v1  
     1{{{
    12[root@localhost]# python setup.py bdist_egg
    23running bdist_egg
     
    111112removing 'build/bdist.linux-x86_64/egg' (and everything under it)
    112113[root@localhost]#
     114}}}