Message291725
Two new opcodes BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL (added in 3.5 and 3.6) have too long names (26 and 28 characters). This exceeds the width of the opcode names in the dis module (20 characters). Increasing the width of the column will make opcode arguments too distant from opcode names, that will decrease readability. The better solution would be renaming these two opcodes.
They are used for merging iterables and mappings of positional and keyword arguments when used var-positional (*args) and var-keyword (**kwargs) arguments. Maybe new names should reflect this.
>>> dis.dis('f(a, b, *args, x=x, y=y, **kw)')
1 0 LOAD_NAME 0 (f)
2 LOAD_NAME 1 (a)
4 LOAD_NAME 2 (b)
6 BUILD_TUPLE 2
8 LOAD_NAME 3 (args)
10 BUILD_TUPLE_UNPACK_WITH_CALL 2
12 LOAD_NAME 4 (x)
14 LOAD_NAME 5 (y)
16 LOAD_CONST 0 (('x', 'y'))
18 BUILD_CONST_KEY_MAP 2
20 LOAD_NAME 6 (kw)
22 BUILD_MAP_UNPACK_WITH_CALL 2
24 CALL_FUNCTION_EX 1
26 RETURN_VALUE |
|
Date |
User |
Action |
Args |
2017-04-15 17:27:19 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ncoghlan |
2017-04-15 17:27:19 | serhiy.storchaka | set | messageid: <1492277239.5.0.348724747458.issue30076@psf.upfronthosting.co.za> |
2017-04-15 17:27:19 | serhiy.storchaka | link | issue30076 messages |
2017-04-15 17:27:18 | serhiy.storchaka | create | |
|