Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-38558: Link to further docs from walrus operator mention in tutorial #16973

Merged
merged 11 commits into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Doc/faq/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ variables and instance variables live in two different namespaces, and you need
to tell Python which namespace to use.


.. _why-can-t-i-use-an-assignment-in-an-expression:

Why can't I use an assignment in an expression?
-----------------------------------------------

Expand Down
7 changes: 4 additions & 3 deletions Doc/tutorial/datastructures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down