On Sun, Aug 11, 2013 at 3:43 AM, Roy Smith <r...@panix.com> wrote:
> In article <mailman.452.1376188442.1251.python-l...@python.org>,
>  Chris Angelico <ros...@gmail.com> wrote:
>
>> When you get a syntax error you can't understand, look at the previous
>> line of code. Perhaps something there is incomplete; maybe you have
>> mismatched parentheses, so this line is considered to be part of the
>> same expression.
>>
>> Next thing to do is split it into more lines. Why is all that in a single
>> line?
>
> Also, try reformatting the code in a tool like emacs or eclipse which
> does syntax coloring and auto indenting.  Often, if you're missing some
> piece of punctuation, it will become obvious when your tool tries to
> indent things in some unexpected way.  Or suddenly starts coloring all
> of your program text as if it were a string literal :-)

Agreed. Though I've had some odd issues with SciTE in that way; I
think its Python handling may have bugs in it here and there. But 95%
of the time it's helpful.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to