python - more descriptive error message than "SyntaxError: invalid syntax" -


learning python, coming php background. keeping short. there way more descriptive error messages syntax error? in php. example: print var should give "expecting ( " , instead of standard "syntaxerror: invalid syntax"

thanks

my advice use solid ide. tried few before settling down aptana studio free (as in freedom) , cross-platform, sure many other offer similar functionality.

ide syntax highlighting try parse code before runtime, , signal mistake (sometimes have "false positives" exception, accurate).

here's screenshot illustrate how works.

this wrong code:

enter image description here

and popup shows when hover on red x mark.

enter image description here

as delnan correctly pointed out in comments question, there lot of possible "right" things can go after print, hence verbosity of popup. nevertheless find feature useful, shows methods unimported objects, variables referenced before assignment , on , forth.

hth!


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -