➜

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.

作者 larry
收信人 larry, meador.inge, ncoghlan, zach.ware
日期 2014-08-19.05:37:31
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1408426651.51.0.258056628619.issue20291@psf.upfronthosting.co.za>
In-reply-to
内容
So, let's think about this for a minute.  What's the API that we *want* here?

If your function has the signature
   (a, b, c=20, *args)
and you call it with
   (1, 2, 3, 4, 5)
should "args" be (4, 5), or (1, 2, 3, 4, 5)?

I assert that the impl function should get the same "args" (and "kwargs") that a Python function would--that is, post-argument-processing.  In the above example "args" should get (4, 5).

This might be somewhat painful to do in round 1, where we're still leveraging off PyArg_ParseTuple*.  But in the future it'll be cheaper to do it this way.  In any case, it's the right API, so that's what we should do.

(Adding Nick just to see if he agrees--he had a use case for *args in the builtin module.)
历史
日期 用户 动作 参数
2014-08-19 05:37:31larry修改recipients: + larry, ncoghlan, meador.inge, zach.ware
2014-08-19 05:37:31larry修改messageid: <1408426651.51.0.258056628619.issue20291@psf.upfronthosting.co.za>
2014-08-19 05:37:31larry链接issue20291 messages
2014-08-19 05:37:31larry创建