How to Address Syntax Errors in Python 3


show more Dealing with syntax errors provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training show less
please wait ...

Dealing with syntax errors

As you are building code in Python, you may occasionally make a typo, or misplace a punctuation mark or forget a comma or something like that. The Python interpreter will do its best to try to guide you to where the errors are and sometimes it's helpful and sometimes it's not. Let's take a look at some examples here. There is a file in your debugging folder called saytime-errors.py. We will go ahead and make a working copy of this and we will call this saytime-errors-working.py.

I will go ahead and open that working copy and this is the saytime module and it has some errors in it. So we will go ahead and we will run it and see what happens, and it's flagged a syntax error here. It says Syntaxerror: invalid syntax and you see that little caret is pointing at the second quote mark on line 26. So, we will scroll down here to line 26 and you see a little red x there and if I hold my cursor over the red x, we are getting a different error message and this is because Eclipse is do...

Dealing with syntax errors
Video duration: 8m 19s 6h 36m Beginner

Viewers:

Dealing with syntax errors provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training

Subjects:
Developer Web
Software:
Python
Author:
please wait ...