classification
Title: Pegen: dict unpacking inside dict comprehension
Type: Stage: resolved
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, gvanrossum, lys.nikolaou, miss-islington, pablogsal
Priority: normal Keywords: patch

Created on 2020-05-21 16:37 by BTaskaya, last changed 2020-05-21 22:58 by miss-islington. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20292 merged BTaskaya, 2020-05-21 16:38
PR 20303 merged miss-islington, 2020-05-21 22:40
Messages (3)
msg369527 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python triager) Date: 2020-05-21 16:37
>>> {**{} for a in [1]}
ValueError: field 'key' is required for DictComp

should be

>>> {**{} for a in [1]}
  File "<stdin>", line 1
    {**{} for a in [1]}
     ^
SyntaxError: dict unpacking cannot be used in dict comprehension
msg369548 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-05-21 22:40
New changeset b8a65ec1d3d4660d0ee38a9765d98f5cdcabdef5 by Batuhan Taskaya in branch 'master':
bpo-40715: Reject dict unpacking on dict comprehensions (GH-20292)
https://github.com/python/cpython/commit/b8a65ec1d3d4660d0ee38a9765d98f5cdcabdef5
msg369550 - (view) Author: miss-islington (miss-islington) Date: 2020-05-21 22:58
New changeset d00aaf306aecf2d4bf9c9aebc9bc35ed03b1a7d0 by Miss Islington (bot) in branch '3.9':
bpo-40715: Reject dict unpacking on dict comprehensions (GH-20292)
https://github.com/python/cpython/commit/d00aaf306aecf2d4bf9c9aebc9bc35ed03b1a7d0
History
Date User Action Args
2020-05-21 22:58:23miss-islingtonsetmessages: + msg369550
2020-05-21 22:41:05pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-05-21 22:40:14miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request19577
2020-05-21 22:40:03pablogsalsetmessages: + msg369548
2020-05-21 17:58:35pablogsalsetnosy: + gvanrossum, lys.nikolaou, pablogsal
2020-05-21 16:38:53BTaskayasetkeywords: + patch
stage: patch review
pull_requests: + pull_request19567
2020-05-21 16:37:08BTaskayacreate