PEP-448 unpacking in dict literals.
ClosedPublic

Authored by flherne on Dec 29 2016, 8:22 PM.

Details

Summary

Logical equivalent of D3844.

foo = {'a': 2}
bar = {**foo}

Previously, foo would incorrectly be added to the value type of bar.

N.B. this allows Ast::DictAst::keys to contain null values (for unpacked dicts, where there is no key). This is necessary to determine which values should be unpacked, because the value node has no different properties.

Test Plan

No test regressions. Two new tests previously failed, now pass.

Diff Detail

Repository
R53 KDevelop: Python Support
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
flherne updated this revision to Diff 9474.Dec 29 2016, 8:22 PM
flherne retitled this revision from to PEP-448 unpacking in dict literals..
flherne updated this object.
flherne edited the test plan for this revision. (Show Details)
flherne added a reviewer: brauch.
flherne set the repository for this revision to R53 KDevelop: Python Support.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptDec 29 2016, 8:22 PM
This revision was automatically updated to reflect the committed changes.