osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python3-3.7.3: cannot run pdb


On 6/7/2019 12:26 PM, Rich Shepard wrote:
> Running python3-3.7.3 on Slackware-14.2.

> $ python3 geochem.py
>  ? File "geochem.py", line 35
>  ??? boxchoices = ttk.Combobox(self, textvariable=med,
>  ???????????? ^
> SyntaxError: invalid syntax

An addendum to previous comments solving the issue.  In 3.8.0b1, you 
would see the caret at the beginning of the word, rather than at the end.
...
 >      boxchoices = ttk.Combobox(self, textvariable=med,
 >      ^

This gives a better hint that the error is due to something before the 
'b', or rather that the parser was expecting something other than a 
letter (beginning of name character).  One should therefore imagine that 
there was no preceeding \n and that the initial character, in this case, 
was at the end of the previous line.  The error here is basically the 
same as

 >>> b b
   File "<stdin>", line 1
     b b
       ^
SyntaxError: invalid syntax


-- 
Terry Jan Reedy