title: Python code error with sum() function -- syntax works on one platform not another
body: <p>I'm having an error using Python (inherited code). A Sum() function call that works on one platform is not working on another -- I think it is due to some syntax that is incompatible across platforms. The error I am getting is:</p>
  
  <pre><code>bsrlx1(112)% /usr/bin/python run-print.py init data
    File "run-print.py", line 105
      val = sum(1 if x &gt;= 0.5 else 0 for x in metricC[key]);
                   ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Although this syntax works elsewhere. Anyone know of a syntax change or what the issue might be??</p>
  
  <p>The version of Python I am calling is:
  Python 2.4.3 (#1, Apr 14 2011, 20:41:59) 
  [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2</p>
  
  <p>The header file in my program is: </p>
  
  <pre><code>#!/usr/bin/python2.5
  </code></pre>
  
  <p>So I think I may be using version 2.5</p>