This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Joshua.Landau
Recipients Jeff.Kaufman, Joshua.Landau, NeilGirdhar, Rosuav, SpaghettiToastBook, andybuckley, belopolsky, berker.peksag, eric.araujo, eric.snow, ezio.melotti, georg.brandl, gvanrossum, ncoghlan, paul.moore, pconnell, r.david.murray, terry.reedy, twouters, zbysz
Date 2015-01-23.04:03:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421985830.46.0.939250706921.issue2292@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-01-23 04:03:50Joshua.Landausetrecipients: + Joshua.Landau, gvanrossum, twouters, georg.brandl, terry.reedy, paul.moore, ncoghlan, belopolsky, ezio.melotti, eric.araujo, andybuckley, r.david.murray, zbysz, eric.snow, Rosuav, berker.peksag, pconnell, NeilGirdhar, Jeff.Kaufman, SpaghettiToastBook
2015-01-23 04:03:50Joshua.Landausetmessageid: <1421985830.46.0.939250706921.issue2292@psf.upfronthosting.co.za>
2015-01-23 04:03:50Joshua.Landaulinkissue2292 messages
2015-01-23 04:03:49Joshua.Landaucreate