From 61bd6e52c19150b1a6cbd94c3a0052115828dff4 Mon Sep 17 00:00:00 2001 From: Harry Percival Date: Sat, 20 Sep 2025 11:06:37 +0100 Subject: [PATCH 1/3] Update expected error message for incomplete if syntax this is the latest error message as of Python 3.10 (also 3.11, 3.12, 3.13) --- en/python_introduction/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/python_introduction/README.md b/en/python_introduction/README.md index e3798b6da3e..ede851594cc 100644 --- a/en/python_introduction/README.md +++ b/en/python_introduction/README.md @@ -658,9 +658,9 @@ If we were to save and run this, we'd see an error like this: {% filename %}{{ warning_icon }} command-line{% endfilename %} ``` $ python3 python_intro.py -File "python_intro.py", line 2 - ^ -SyntaxError: unexpected EOF while parsing +File "python_intro.py", line 1 + if 3 > 2: +IndentationError: expected an indented block after 'if' statement on line 1``` ``` 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: From 42dedba801507381638c4baa60516678b39d21e6 Mon Sep 17 00:00:00 2001 From: Raphael Das Gupta Date: Sat, 18 Jul 2026 13:57:59 +0200 Subject: [PATCH 2/3] fix Markdown syntax for code block --- en/python_introduction/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/python_introduction/README.md b/en/python_introduction/README.md index ede851594cc..f2f07d09841 100644 --- a/en/python_introduction/README.md +++ b/en/python_introduction/README.md @@ -660,7 +660,7 @@ If we were to save and run this, we'd see an error like this: $ python3 python_intro.py File "python_intro.py", line 1 if 3 > 2: -IndentationError: expected an indented block after 'if' statement on line 1``` +IndentationError: expected an indented block after 'if' statement on line 1 ``` 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: From 6d221e7cf5812be5c1651b580827023c3f24887a Mon Sep 17 00:00:00 2001 From: Harry Percival Date: Sat, 18 Jul 2026 14:10:20 +0100 Subject: [PATCH 3/3] Update en/python_introduction/README.md Co-authored-by: Raphael Das Gupta --- en/python_introduction/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/python_introduction/README.md b/en/python_introduction/README.md index f2f07d09841..c57d820bc5c 100644 --- a/en/python_introduction/README.md +++ b/en/python_introduction/README.md @@ -658,7 +658,7 @@ If we were to save and run this, we'd see an error like this: {% filename %}{{ warning_icon }} command-line{% endfilename %} ``` $ python3 python_intro.py -File "python_intro.py", line 1 + File "/home/ola/Desktop/python_intro.py", line 1 if 3 > 2: IndentationError: expected an indented block after 'if' statement on line 1 ```