8000 bpo-38558: Link to further docs from walrus operator mention in tutor… by sthagen · Pull Request #223 · sthagen/python-cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-38558: Link to further docs from walrus operator mention in tutor… #223

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

Merged
merged 1 commit 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
bpo-38558: Link to further docs from walrus operator mention in tutor…
  • Loading branch information
adorilson authored Feb 3, 2020
commit 5807efd4c396d5718325e21f5a14e324a77ff77c
2 changes: 2 additions & 0 deletions 8000 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
0