Commit 5990d28
committed
Issue python#20539: Improve math.factorial error messages and types for large inputs.
- Better message for the OverflowError in large positive inputs.
- Changed exception type from OverflowError to ValueError for large negative inputs.1 parent 6ed7c20 commit 5990d28
3 files changed
Lines changed: 26 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
425 | 427 | | |
426 | | - | |
427 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
428 | 436 | | |
429 | 437 | | |
430 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1408 | 1408 | | |
1409 | 1409 | | |
1410 | 1410 | | |
| 1411 | + | |
1411 | 1412 | | |
1412 | 1413 | | |
1413 | 1414 | | |
| |||
1421 | 1422 | | |
1422 | 1423 | | |
1423 | 1424 | | |
1424 | | - | |
| 1425 | + | |
1425 | 1426 | | |
1426 | 1427 | | |
1427 | 1428 | | |
1428 | | - | |
| 1429 | + | |
1429 | 1430 | | |
1430 | | - | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
1431 | 1438 | | |
1432 | | - | |
| 1439 | + | |
| 1440 | + | |
1433 | 1441 | | |
1434 | 1442 | | |
1435 | 1443 | | |
| |||
0 commit comments