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 larry, scoder, serhiy.storchaka, vstinner, xtreak
Date 2019-01-11.12:37:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It might be worth inlining a fast path of "_PyArg_CheckPositional()" that only tests "nargs < min || nargs > max" (even via a macro), and then branches to the full error checking and reporting code only if that fails. Determining the concrete exception to raise is not time critical, but the good case is. Also, that would immediately collapse into "nargs != minmax" for the cases where "min == max", i.e. we expect an exact number of arguments.

And yes, a function that raises the expected exception with the expected error message for a hand full of common cases would be nice. :)
Date User Action Args
2019-01-11 12:37:29scodersetrecipients: + scoder, vstinner, larry, serhiy.storchaka, xtreak
2019-01-11 12:37:27scodersetmessageid: <>
2019-01-11 12:37:27scoderlinkissue35582 messages
2019-01-11 12:37:27scodercreate