◐ Shell
clean mode source ↗

bpo-39320: Handle unpacking of **values in compiler by markshannon · Pull Request #18141 · python/cpython

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