[Tutor] Syntax Errors

Jason Massey jason.massey at gmail.com
Tue Jan 3 23:03:13 CET 2006


Thanks!  It's the tab vs spaces, alright.

I use tabs for my spacing and I was touching a part of the code that a
co-worker wrote.  Guess what he uses?  Spaces.

Thanks for that insight and I'll be sure to read up on the command line

On 1/3/06, Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:
> On Tue, 3 Jan 2006, Jason Massey wrote:
> > I've just finished ripping out a bunch of lines in one of my wxPython
> > programs.  Testing it out I get:
> >
> > C:\Python24>tla2.py
> >   File "C:\Python24\tla2.py", line 412
> >     self.grid.SetCellValue(0,0,"Site")
> >     ^
> > SyntaxError: invalid syntax
> >
> > There's nothing wrong with that line.  I didn't even touch it in the
> > overhaul (refactoring is much too delicate of a word for the surgery I
> > just did).  I can make the error go away by unindenting the line, but
> > all that happens then is the error gets passed onto the next line down.
> Hi Jason,
> Can you show us the line in context?  That is, can you show us a few lines
> above and below?
> Also, let's make sure we're not running into a silly tab-vs-spaces issue.
> Can you try running Python with the '-tt' command line option?  This will
> enable Python to strictly treat mixed tabs and spaces as a bad thing.
> Good luck!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060103/e6a01c55/attachment.htm 

More information about the Tutor mailing list