Message333463
| 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 |
<1547210247.59.0.660182684775.issue35582@roundup.psfhosted.org> |
| In-reply-to |
| Content |
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. :) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2019年01月11日 12:37:29 | scoder | set | recipients:
+ scoder, vstinner, larry, serhiy.storchaka, xtreak |
| 2019年01月11日 12:37:27 | scoder | set | messageid: <1547210247.59.0.660182684775.issue35582@roundup.psfhosted.org> |
| 2019年01月11日 12:37:27 | scoder | link | issue35582 messages |
| 2019年01月11日 12:37:27 | scoder | create |
|