Skip to content

Conversation

@emilyemorehouse
Copy link
Member

@emilyemorehouse emilyemorehouse commented Sep 11, 2019

Add or update assignment expression documentation for:

  • FAQ - Design
  • Reference - Expressions
  • Reference - Lexical Analysis

https://bugs.python.org/issue35224

Automerge-Triggered-By: @matrixise

-----------------------------------------------

Many people used to C or Perl complain that they want to use this C idiom:
Starting in Python 3.8, you can! There is a new syntax, `:=`, that assigns a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emilyemorehouse
Maybe with this sentence?

Starting in Python 3.8, you can use the walrus operator `:=` that assigns a variable in an expression::

    while chunk := fp.read(200):
        print(chunk)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I used your example and added something similar.

Copy link
Member

@matrixise matrixise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@miss-islington
Copy link
Contributor

@emilyemorehouse: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 6357c95 into python:master Sep 11, 2019
@miss-islington
Copy link
Contributor

Thanks @emilyemorehouse for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 11, 2019
…nGH-15935)

Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis

https://bugs.python.org/issue35224

Automerge-Triggered-By: @matrixise
(cherry picked from commit 6357c95)

Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
@bedevere-bot
Copy link

GH-15967 is a backport of this pull request to the 3.8 branch.

matrixise pushed a commit that referenced this pull request Sep 11, 2019
) (GH-15967)

Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis

https://bugs.python.org/issue35224

Automerge-Triggered-By: @matrixise
(cherry picked from commit 6357c95)

Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
DinoV pushed a commit to DinoV/cpython that referenced this pull request Sep 12, 2019
…nGH-15935)

Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis


https://bugs.python.org/issue35224



Automerge-Triggered-By: @matrixise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants