mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
make assigning to a bytes literal a syntax error (closes #11506)
This commit is contained in:
parent
3780542039
commit
bd3e362089
3 changed files with 8 additions and 0 deletions
|
@ -67,6 +67,10 @@ SyntaxError: can't assign to literal
|
|||
Traceback (most recent call last):
|
||||
SyntaxError: can't assign to literal
|
||||
|
||||
>>> b"" = 1
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: can't assign to literal
|
||||
|
||||
>>> `1` = 1
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: invalid syntax
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue