summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2019-10-25 22:27:07 (GMT)
committerGitHub <noreply@github.com>2019-10-25 22:27:07 (GMT)
commitcf028b57169499f82b73dd0977fe0bab40778a60 (patch)
tree3242f28951f4667bc0b129fdc30d1526ca2dbeac
parentedf9e8e98a487229800da832292703a9b3855139 (diff)
downloadcpython-cf028b57169499f82b73dd0977fe0bab40778a60.zip
cpython-cf028b57169499f82b73dd0977fe0bab40778a60.tar.gz
cpython-cf028b57169499f82b73dd0977fe0bab40778a60.tar.bz2
bpo-38558: Mention `:=` in conditions tutorial (GH-16919)
(cherry picked from commit cb2cf06b0aad1851f54999497c1b50c381d1fdd8) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
-rw-r--r--Doc/tutorial/datastructures.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index a0d5627..2f7afb0 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -675,10 +675,10 @@ to a variable. For example, ::
>>> non_null
'Trondheim'
-Note that in Python, unlike C, assignment cannot occur inside expressions. C
-programmers may grumble about this, but it avoids a common class of problems
-encountered in C programs: typing ``=`` in an expression when ``==`` was
-intended.
+Note that in Python, unlike C, assignment inside expressions must be done
+explicitly with the walrus operator ``:=``. This avoids a common class of
+problems encountered in C programs: typing ``=`` in an expression when ``==``
+was intended.
.. _tut-comparing: