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: Syntax error message uses strange term: "named assignment"
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: nedbat, rhettinger
Priority: normal Keywords: patch

Created on 2020-01-01 01:44 by nedbat, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17777 merged nedbat, 2020-01-01 01:55
PR 17778 merged miss-islington, 2020-01-01 02:43
Messages (4)
msg359138 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2020-01-01 01:44
I know this is not allowed:

>>> ((a, b, c) := (1, 2, 3))
  File "<stdin>", line 1
SyntaxError: cannot use named assignment with tuple


But what is "named assignment", and why is this SyntaxError talking about it?  Shouldn't it say "cannot use assignment expressions with tuple" ?
msg359143 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-01-01 02:41
New changeset 37143a8e3b2e9245d52f4ddebbdd1c6121c96884 by Raymond Hettinger (Ned Batchelder) in branch 'master':
bpo-39176: Improve error message for 'named assignment' (GH-17777)
https://github.com/python/cpython/commit/37143a8e3b2e9245d52f4ddebbdd1c6121c96884
msg359144 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-01-01 02:45
Thanks for the patch.
msg359145 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-01-01 03:28
New changeset 6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
bpo-39176: Improve error message for 'named assignment' (GH-17777) (GH-17778)
https://github.com/python/cpython/commit/6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83357
2020-01-01 03:28:11rhettingersetmessages: + msg359145
2020-01-01 02:45:42rhettingersetstatus: open -> closed

components: + Interpreter Core
versions: + Python 3.8, Python 3.9
messages: + msg359144
type: behavior
resolution: fixed
stage: patch review -> resolved
2020-01-01 02:43:22miss-islingtonsetpull_requests: + pull_request17211
2020-01-01 02:41:05rhettingersetnosy: + rhettinger
messages: + msg359143
2020-01-01 01:55:31nedbatsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17210
2020-01-01 01:44:07nedbatcreate