Joshua Landau added the comment:

No, that happens in CALL_FUNCTION_KW:

>>> import dis
>>> dis.dis("f(x=1, **{'x': 1})")
  1           0 LOAD_NAME                0 (f)
              3 LOAD_CONST               0 ('x')
              6 LOAD_CONST               1 (1)
              9 LOAD_CONST               1 (1)
             12 LOAD_CONST               0 ('x')
             15 BUILD_MAP                1
             18 CALL_FUNCTION_KW       256 (0 positional, 1 keyword pair)
             21 RETURN_VALUE

There's no call to BUILD_MAP_UNPACK at all. Namely, it's raised from 
update_keyword_args (in turn from ext_do_call).


--- Tangential note: ---

In fact, it seems the only reason we keep the mess of unpacking in two places 
rather than just using BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK unconditionally 
is that CALL_FUNCTION_XXX looks to be slightly more efficient by only dealing 
with the case of a single unpack at the end. I think I see how to make the 
_UNPACKs fast enough for this case, though, so maybe we could remove it and 
unify a few things. I'd need to write it up, though.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2292>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to