]> granicus.if.org Git - python/commitdiff
bpo-38558: Mention `:=` in conditions tutorial (GH-16919)
authorAmmar Askar <ammar@ammaraskar.com>
Fri, 25 Oct 2019 22:20:05 +0000 (18:20 -0400)
committerZachary Ware <zach@python.org>
Fri, 25 Oct 2019 22:20:05 +0000 (17:20 -0500)
Doc/tutorial/datastructures.rst

index a0d56274fd7e83a8f1d9d3be86de7ebb8a3c88af..2f7afb088f3bbbffe6aee9d9975163f17e000204 100644 (file)
@@ -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: