Add kwonly parsing.

* annotation parsing for kwonly args is missing.
* Start filling out runnable tests. More work is needed on tests.
* refresh incorrect bytecode_3.3_run/15_assert.pyc
This commit is contained in:
rocky
2019-06-08 15:22:50 -04:00
parent e9002038f8
commit 117b4ff4f1
6 changed files with 72 additions and 33 deletions

View File

@@ -331,9 +331,10 @@ class Scanner3(Scanner):
attr = attr[:4] # remove last value: attr[5] == False
else:
pos_args, name_pair_args, annotate_args = parse_fn_counts(inst.argval)
pattr = ("%d positional, %d keyword pair, %d annotated" %
pattr = ("%d positional, %d keyword only, %d annotated" %
(pos_args, name_pair_args, annotate_args))
if name_pair_args > 0:
# FIXME: this should probably be K_
opname = '%s_N%d' % (opname, name_pair_args)
pass
if annotate_args > 0: