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 scoder
Recipients rhettinger, scoder, serhiy.storchaka, skrah, vstinner
Date 2017-06-12.14:43:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497278590.54.0.92192759085.issue29464@psf.upfronthosting.co.za>
In-reply-to
Content
I do not see this as a matter of performance but as a matter of usability. Basically, CPython could do just fine with just a single catch-all calling convention that packs all pos/kw arguments into C arguments and passes them over, leaving it entirely to the callee to handle them. Why does it not do that? Because it's cumbersome for the callee to analyse what kind of arguments it received and how to handle them.

A surprisingly large number of functions take only a single argument, that's why METH_O exists. Many functions take no keyword arguments, that's why VARARGS and KEYWORDS are separate options. The same should apply to FASTCALL. Also with that, many implementors will not want to care about keyword arguments and would thus appreciate it if they didn't have to. Forcing them to test for keyword arguments and raising the correct error for it (with the correct and consistent message) seems an entirely unnecessary imposition.
History
Date User Action Args
2017-06-12 14:43:10scodersetrecipients: + scoder, rhettinger, vstinner, skrah, serhiy.storchaka
2017-06-12 14:43:10scodersetmessageid: <1497278590.54.0.92192759085.issue29464@psf.upfronthosting.co.za>
2017-06-12 14:43:10scoderlinkissue29464 messages
2017-06-12 14:43:09scodercreate