mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-38558: Link to further docs from walrus operator mention in tutorial (GH-16973)
This commit is contained in:
parent
49932fec62
commit
5807efd4c3
2 changed files with 6 additions and 3 deletions
|
@ -676,9 +676,10 @@ to a variable. For example, ::
|
|||
'Trondheim'
|
||||
|
||||
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.
|
||||
explicitly with the
|
||||
:ref:`walrus operator <why-can-t-i-use-an-assignment-in-an-expression>` ``:=``.
|
||||
This avoids a common class of problems encountered in C programs: typing ``=``
|
||||
in an expression when ``==`` was intended.
|
||||
|
||||
|
||||
.. _tut-comparing:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue