Oct-27-2019, 08:38 PM
So I updated some code I've been using for a while. I went to test the new code and got the following syntax error:
Output: File "minilog.py", line 379
fields = [ for arguments in argument]
^
SyntaxError: invalid syntax
No problem. I stopped working on that line halfway through because I thought of a better way to do it. So I deleted that line and ran it again. I got this syntax error:Output: File "minilog.py", line 111
aliases = {'<': 'previous', '>': 'next', 'g': 'goto', 'q': 'quit', 'r': 'rows' 't': 'text', 'v': 'view'}
^
SyntaxError: invalid syntax
Okay, I forgot a comma when adding an item to a dictionary. I do that all the time. I fixed it and ran it, and everything worked fine. But then it hit me. The first error is on line 379, but the second error is before that on line 111. Python checks syntax back to front?