Message291778
If we used the names from inspect.Parameter.kind (https://docs.python.org/3/library/inspect.html#inspect.Parameter.kind) these would become:
* BUILD_VAR_POSITIONAL
* BUILD_VAR_KEYWORD
which would be 20 and 17 letters long, respectively.
I think that would also make the disassembled bytecode more self-explanatory:
>>> 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_VAR_POSITIONAL 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_VAR_KEYWORD 2
24 CALL_FUNCTION_EX 1
26 RETURN_VALUE |
|
Date |
User |
Action |
Args |
2017-04-17 04:32:28 | ncoghlan | set | recipients:
+ ncoghlan, serhiy.storchaka |
2017-04-17 04:32:28 | ncoghlan | set | messageid: <1492403548.47.0.69219567691.issue30076@psf.upfronthosting.co.za> |
2017-04-17 04:32:28 | ncoghlan | link | issue30076 messages |
2017-04-17 04:32:28 | ncoghlan | create | |
|