Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@markshannon
Copy link
Member

@markshannonmarkshannon commentedJan 23, 2020
edited by bedevere-bot
Loading

This is the second part of the implementation ofbpo-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 callsitem_n.update(tos) whereitem_n is thenth item on the stack andtos 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

@markshannonmarkshannonforce-pushed thehandle-dict-unpacking-in-compiler branch fromb6ad237 to95e421cCompareJanuary 23, 2020 10:11
@@ -0,0 +1,12 @@

Replace two complex bytecodes for building dicts with two simpler ones.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Different paragraphs render badly when joining the NEWS entries, sadly

@markshannonmarkshannon added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJan 23, 2020
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit2d2fe4c 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJan 23, 2020
@pablogsal
Copy link
Member

The failures inAMD64 Fedora Stable Clang Installed PR,buildbot/PPC64 Fedora PR andbuildbot/x86 Gentoo Installed with X PR are unrelated so don't worry about them.

@markshannon
Copy link
MemberAuthor

OK, merging.

@markshannonmarkshannon merged commit8a4cd70 intopython:masterJan 27, 2020
@markshannonmarkshannon deleted the handle-dict-unpacking-in-compiler branchJanuary 27, 2020 09:57
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull requestJan 31, 2020
* Add DICT_UPDATE and DICT_MERGE bytecodes. Use them for ** unpacking.* Remove BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL, as they are now unused.* Update magic number for ** unpacking opcodes.* Update dis.rst to incorporate new bytecodes.* Add blurb entry.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pablogsalpablogsalpablogsal left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@markshannon@bedevere-bot@pablogsal@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp