mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-39320: Handle unpacking of *values in compiler (GH-17984)
* Add three new bytecodes: LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE. Use them to implement star unpacking expressions. * Remove four bytecodes BUILD_LIST_UNPACK, BUILD_TUPLE_UNPACK, BUILD_SET_UNPACK and BUILD_TUPLE_UNPACK_WITH_CALL opcodes as they are now unused. * Update magic number and dis.rst for new bytecodes.
This commit is contained in:
parent
f9e07e116c
commit
13bc13960c
10 changed files with 2349 additions and 2360 deletions
|
@ -252,12 +252,12 @@ What about willful misconduct?
|
|||
>>> h(1, *h)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: test.test_extcall.h() argument after * must be an iterable, not function
|
||||
TypeError: Value after * must be an iterable, not function
|
||||
|
||||
>>> h(*[1], *h)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: test.test_extcall.h() argument after * must be an iterable, not function
|
||||
TypeError: Value after * must be an iterable, not function
|
||||
|
||||
>>> dir(*h)
|
||||
Traceback (most recent call last):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue