This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: b'' += gives SystemError instead of SyntaxError
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.1, Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Trundle, benjamin.peterson, ezio.melotti, ncoghlan, python-dev, terry.reedy
Priority: normal Keywords: patch

Created on 2011-03-14 19:41 by ncoghlan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue_11506.patch Trundle, 2011-03-17 17:52 review
issue_11506_v2.patch Trundle, 2011-04-12 23:20
Messages (6)
msg130881 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2011-03-14 19:41
b'' += source gives SystemError instead of SyntaxError
msg130899 - (view) Author: Andreas Stührk (Trundle) * Date: 2011-03-14 21:13
Seems like like a case for "Bytes_kind" is missing in `set_context()`. Attached is a patch, without a test though.
msg131272 - (view) Author: Andreas Stührk (Trundle) * Date: 2011-03-17 17:52
Added a test. Perhaps that should be done for other literals as well?
msg133618 - (view) Author: Andreas Stührk (Trundle) * Date: 2011-04-12 23:20
Benjamin told me that "test_syntax" is the right place for the test and indeed, there are quite some literals already tested.
msg133622 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-12 23:33
New changeset 4d9a8e84279a by Benjamin Peterson in branch '3.1':
make assigning to a bytes literal a syntax error (closes #11506)
http://hg.python.org/cpython/rev/4d9a8e84279a
msg133633 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-04-13 01:36
Thanks all for fixing. This 'silently' crashes IDLE with no message.
Just 'poof'.
History
Date User Action Args
2022-04-11 14:57:14adminsetgithub: 55715
2011-04-13 01:36:33terry.reedysetnosy: + terry.reedy
messages: + msg133633
2011-04-12 23:33:58python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg133622

resolution: fixed
stage: resolved
2011-04-12 23:26:06santoso.wijayasettype: behavior
components: + Interpreter Core
versions: + Python 3.1, Python 3.2, Python 3.3
2011-04-12 23:20:19Trundlesetfiles: + issue_11506_v2.patch
nosy: + benjamin.peterson
messages: + msg133618

2011-03-17 17:52:44Trundlesetfiles: + issue_11506.patch
nosy: ncoghlan, ezio.melotti, Trundle
messages: + msg131272
2011-03-17 17:50:44Trundlesetfiles: - issue_11506.patch
nosy: ncoghlan, ezio.melotti, Trundle
2011-03-14 21:15:00ezio.melottisetnosy: + ezio.melotti
2011-03-14 21:13:14Trundlesetfiles: + issue_11506.patch

nosy: + Trundle
messages: + msg130899

keywords: + patch
2011-03-14 19:41:35ncoghlancreate