Author ncoghlan
Recipients ncoghlan, serhiy.storchaka
Date 2017-04-17.04:32:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492403548.47.0.69219567691.issue30076@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-04-17 04:32:28ncoghlansetrecipients: + ncoghlan, serhiy.storchaka
2017-04-17 04:32:28ncoghlansetmessageid: <1492403548.47.0.69219567691.issue30076@psf.upfronthosting.co.za>
2017-04-17 04:32:28ncoghlanlinkissue30076 messages
2017-04-17 04:32:28ncoghlancreate