I tested the same code and got the same syntax error. Then I used Fabioz's suggestion to check the project configuration. Sure enough, it was still configured for 2.4 even though I had advanced the interpreter to 2.5. Changing the project config made the syntax error go away.
Thanks,
< david
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
pydev is marking valid syntax with errors.
the following line is valid
return x if y else z
but pydev does not expect the 'if' to be there. I believe I have the latest version of pydev, shouldn't this be fixed by now?
It should work if you configure your project as python 2.5 (see http://fabioz.com/pydev/manual_101_project_conf2.html for info on how to config that).
Cheers,
Fabio
The Project is configured as python 2.5. I checked 3 times... :(
Do you have something in your error log? Are you using PyLint? Is your configured interpreter python 2.5?
Cheers,
Fabio
I am not using PyLint.
Interpreter is set to python 2.5
log file is there:
http://www.sendspace.com/file/hgtzl7
Cheers,
Pascal
Oups... Sorry for answering in the wrong Thread. (I was tired last night....)
Hi,
I tested the same code and got the same syntax error. Then I used Fabioz's suggestion to check the project configuration. Sure enough, it was still configured for 2.4 even though I had advanced the interpreter to 2.5. Changing the project config made the syntax error go away.
Thanks,
< david
Thank you for the quick response, I could not find that config screen before. I changed the version and it worked. Thanks!!