Issue #23275: Allow () = iterable assignment syntax

Documentation updates by Martin Panter.
This commit is contained in:
Berker Peksag 2016-05-18 08:44:29 +03:00
parent 93d22ecc7c
commit 094c9c921c
7 changed files with 41 additions and 41 deletions

View file

@ -35,14 +35,6 @@ SyntaxError: invalid syntax
Traceback (most recent call last):
SyntaxError: can't assign to keyword
It's a syntax error to assign to the empty tuple. Why isn't it an
error to assign to the empty list? It will always raise some error at
runtime.
>>> () = 1
Traceback (most recent call last):
SyntaxError: can't assign to ()
>>> f() = 1
Traceback (most recent call last):
SyntaxError: can't assign to function call
@ -491,10 +483,6 @@ Traceback (most recent call last):
...
SyntaxError: keyword argument repeated
>>> del ()
Traceback (most recent call last):
SyntaxError: can't delete ()
>>> {1, 2, 3} = 42
Traceback (most recent call last):
SyntaxError: can't assign to literal