Skip to content

bpo-39320: Handle unpacking of **values in compiler#18141

Merged
markshannon merged 6 commits intopython:masterfrom
markshannon:handle-dict-unpacking-in-compiler
Jan 27, 2020
Merged

bpo-39320: Handle unpacking of **values in compiler#18141
markshannon merged 6 commits intopython:masterfrom
markshannon:handle-dict-unpacking-in-compiler

Conversation

@markshannon
Copy link
Member

@markshannon markshannon commented Jan 23, 2020

This is the second part of the implementation of bpo-39320.
Part 1 was #17984

This PR replaces BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL
with DICT_MERGE and DICT_UPDATE.

DICT_UPDATE n calls item_n.update(tos) where item_n is the nth item on the stack and tos is popped from the stack.
DICT_MERGE n is the same, but raises an exception if there are duplicate keys.

https://bugs.python.org/issue39320

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants