Commit 2bfdc0a
committed
gh-133895: provide C99 Annex F return values for math functions
Now this information is available as the "value" attribute of the
ValueError exception object:
```pycon
>>> import math
>>> try:
... math.gamma(-0.0)
... except ValueError as exc:
... print(exc.value)
...
-inf
```1 parent f806463 commit 2bfdc0a
File tree
5 files changed
+39
-11
lines changed- Doc
- library
- whatsnew
- Lib/test
- Misc/NEWS.d/next/Library
- Modules
5 files changed
+39
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
825 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
826 | 829 | | |
827 | 830 | | |
828 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2069 | 2069 | | |
2070 | 2070 | | |
2071 | 2071 | | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
| 2072 | + | |
2075 | 2073 | | |
2076 | 2074 | | |
2077 | 2075 | | |
2078 | 2076 | | |
2079 | | - | |
2080 | | - | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
2081 | 2080 | | |
2082 | 2081 | | |
2083 | 2082 | | |
| |||
2110 | 2109 | | |
2111 | 2110 | | |
2112 | 2111 | | |
2113 | | - | |
2114 | | - | |
2115 | | - | |
| 2112 | + | |
2116 | 2113 | | |
2117 | 2114 | | |
2118 | 2115 | | |
2119 | 2116 | | |
2120 | | - | |
2121 | | - | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
2122 | 2120 | | |
2123 | 2121 | | |
2124 | 2122 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
843 | 857 | | |
844 | 858 | | |
845 | 859 | | |
| |||
852 | 866 | | |
853 | 867 | | |
854 | 868 | | |
| 869 | + | |
855 | 870 | | |
856 | 871 | | |
857 | 872 | | |
| |||
954 | 969 | | |
955 | 970 | | |
956 | 971 | | |
| 972 | + | |
957 | 973 | | |
958 | 974 | | |
959 | 975 | | |
| |||
979 | 995 | | |
980 | 996 | | |
981 | 997 | | |
| 998 | + | |
982 | 999 | | |
983 | 1000 | | |
984 | 1001 | | |
| |||
0 commit comments