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:

and popup shows when hover on red x mark.

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
Post a Comment