➜

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.

作者 Joshua.Landau
收信人 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
日期 2015-01-22.22:36:02
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1421966162.65.0.666772183716.issue2292@psf.upfronthosting.co.za>
In-reply-to
内容
I imagine it like (in the map unpacking code)

    func_offset = (oparg >> 8) & 0xFF;
    num_maps = oparg & 0xFF;

    // later
    if (func_offset) {
        // do checks
        if (repeated_argument) {
            raise_error_from_function(PEEK(func_offset + num_maps));
        }
    }

This code should be relatively quick, in an already-slow opcode, and rather short.

If adding to CALL_FUNCTION_XXX, you would have to add an EXTENDED_ARG opcode (because CALL_FUNCTION_XXX already uses the bottom 16 bits), add checks for the top bits in the opcode, duplicate the (large) dictionary merging function. This doesn't seem like it saves much work.
历史
日期 用户 动作 参数
2015-01-22 22:36:02Joshua.Landau修改recipients: + 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-22 22:36:02Joshua.Landau修改messageid: <1421966162.65.0.666772183716.issue2292@psf.upfronthosting.co.za>
2015-01-22 22:36:02Joshua.Landau链接issue2292 messages
2015-01-22 22:36:02Joshua.Landau创建