Conditional expression in 2.5 not working

Daniel
2006-09-29
2013-03-15
  • Daniel
    Daniel
    2006-09-29

    Conditional expression doesn't seem to work.

    Here's the error message that comes up in "problems" view:

    Encountered "if" at line 171, column 49. Was expecting one of:     "(" ...     ")" ...     "[" ...     "," ...     "." ...     "+" ...     "-" ...     "*" ...     "/" ...     "//" ...     "<<" ...     ">>" ...     "%" ...     "^" ...     "|" ...     "&" ...     ">" ...     "<" ...     "==" ...     "<=" ...     ">=" ...     "<>" ...     "!=" ...     "or" ...     "and" ...     "not" ...     "is" ...     "in" ...     "for" ...     "**" ...    

    Here's the actual code:
            dbNames = {'table':table,
                       'idList':(str(tuple(idList)) if len(idList) > 1 else '(' + str(idList[0]) + ')'),
                       'idColumn':idColumn}

    Daniel

     
    • Fabio Zadrozny
      Fabio Zadrozny
      2006-09-29

      It works here... did you set python 2.5 in your project propertis (under Pydev - project type)?

       
    • Daniel
      Daniel
      2006-10-03

      I hadn't.  That seems to fix it after a restart of eclipse.

      Daniel