PEP 572: Fix a small issue found by Steve Dower, and clarify priority around commas.
This commit is contained in:
parent
6a681307a6
commit
79480d5cde
|
@ -329,15 +329,20 @@ found in assignment statements:
|
|||
|
||||
- Multiple targets are not directly supported::
|
||||
|
||||
x = y = z = 0 # Equivalent: (x := (y := (z := 0)))
|
||||
x = y = z = 0 # Equivalent: (z := (y := (x := 0)))
|
||||
|
||||
- Single assignment targets more complex than a single ``NAME`` are
|
||||
- Single assignment targets other than than a single ``NAME`` are
|
||||
not supported::
|
||||
|
||||
# No equivalent
|
||||
a[i] = x
|
||||
self.rest = []
|
||||
|
||||
- Priority around commas is different::
|
||||
|
||||
x = 1, 2 # Sets x to (1, 2)
|
||||
(x := 1, 2) # Sets x to 1
|
||||
|
||||
- Iterable packing and unpacking (both regular or extended forms) are
|
||||
not supported::
|
||||
|
||||
|
|
Loading…
Reference in New Issue