Questions tagged [python-assignment-expression]

Assignment expressions (a := b) are a new syntactic structure that were proposed in PEP 572 and introduced in Python 3.8

After acceptance of PEP 572, introduced assignment expressions, which are a way to assign to variables within an expression using the notation NAME := expr.

31 questions
-4
votes
1 answer

What is the difference between := and ::= in Python?

I see Python examples with := and ::=. I've got a good understanding of the walrus operator from an article on RealPython(The Walrus Operator: Python 3.8 Assignment Expressions). I also went through the BNF document in Wikipedia (Backus–Naur form).…
sol1000
  • 141
  • 1
  • 6
1 2
3