summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmmar Askar <ammar@ammaraskar.com>2019-10-25 22:20:05 (GMT)
committerZachary Ware <zach@python.org>2019-10-25 22:20:05 (GMT)
commitcb2cf06b0aad1851f54999497c1b50c381d1fdd8 (patch)
treed60ba7a3e522f5cc535767f91ead6b2be1d7505d
parent7320ec05f72fc27b25789fe76f8297644e7e7e0a (diff)
downloadcpython-cb2cf06b0aad1851f54999497c1b50c381d1fdd8.zip
cpython-cb2cf06b0aad1851f54999497c1b50c381d1fdd8.tar.gz
cpython-cb2cf06b0aad1851f54999497c1b50c381d1fdd8.tar.bz2
bpo-38558: Mention `:=` in conditions tutorial (GH-16919)
-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: