Skip to content

Commit d3aacd6

Browse files
authored
Merge pull request #1874 from hjwp/patch-2
Update expected error message for incomplete if syntax
2 parents b9980d3 + 6d221e7 commit d3aacd6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

en/python_introduction/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,9 +658,9 @@ If we were to save and run this, we'd see an error like this:
658658
{% filename %}{{ warning_icon }} command-line{% endfilename %}
659659
```
660660
$ python3 python_intro.py
661-
File "python_intro.py", line 2
662-
^
663-
SyntaxError: unexpected EOF while parsing
661+
File "/home/ola/Desktop/python_intro.py", line 1
662+
if 3 > 2:
663+
IndentationError: expected an indented block after 'if' statement on line 1
664664
```
665665

666666
Python expects us to give further instructions to it which are executed if the condition `3 > 2` turns out to be true (or `True` for that matter). Let’s try to make Python print “It works!”. Change your code in your **python_intro.py** file to this:

0 commit comments

Comments
 (0)