mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
merge 3.2
This commit is contained in:
commit
59c90c6cb2
3 changed files with 8 additions and 0 deletions
|
@ -67,6 +67,10 @@ SyntaxError: can't assign to literal
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
SyntaxError: can't assign to literal
|
SyntaxError: can't assign to literal
|
||||||
|
|
||||||
|
>>> b"" = 1
|
||||||
|
Traceback (most recent call last):
|
||||||
|
SyntaxError: can't assign to literal
|
||||||
|
|
||||||
>>> `1` = 1
|
>>> `1` = 1
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
SyntaxError: invalid syntax
|
SyntaxError: invalid syntax
|
||||||
|
|
|
@ -716,6 +716,9 @@ Core and Builtins
|
||||||
|
|
||||||
- Add sys.flags attribute for the new -q command-line option.
|
- Add sys.flags attribute for the new -q command-line option.
|
||||||
|
|
||||||
|
- Issue #11506: Trying to assign to a bytes literal should result in a
|
||||||
|
SyntaxError.
|
||||||
|
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
@ -483,6 +483,7 @@ set_context(struct compiling *c, expr_ty e, expr_context_ty ctx, const node *n)
|
||||||
case Set_kind:
|
case Set_kind:
|
||||||
case Num_kind:
|
case Num_kind:
|
||||||
case Str_kind:
|
case Str_kind:
|
||||||
|
case Bytes_kind:
|
||||||
expr_name = "literal";
|
expr_name = "literal";
|
||||||
break;
|
break;
|
||||||
case Ellipsis_kind:
|
case Ellipsis_kind:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue