Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
floatobject contains this code:
Lines 101 to 123 in ba82a24
| #defineSetIntFlag(flag) \ | |
| PyStructSequence_SET_ITEM(floatinfo, pos++, PyLong_FromLong(flag)) | |
| #defineSetDblFlag(flag) \ | |
| PyStructSequence_SET_ITEM(floatinfo, pos++, PyFloat_FromDouble(flag)) | |
| SetDblFlag(DBL_MAX); | |
| SetIntFlag(DBL_MAX_EXP); | |
| SetIntFlag(DBL_MAX_10_EXP); | |
| SetDblFlag(DBL_MIN); | |
| SetIntFlag(DBL_MIN_EXP); | |
| SetIntFlag(DBL_MIN_10_EXP); | |
| SetIntFlag(DBL_DIG); | |
| SetIntFlag(DBL_MANT_DIG); | |
| SetDblFlag(DBL_EPSILON); | |
| SetIntFlag(FLT_RADIX); | |
| SetIntFlag(FLT_ROUNDS); | |
| #undef SetIntFlag | |
| #undef SetDblFlag | |
| if (PyErr_Occurred()){ | |
| Py_CLEAR(floatinfo); | |
| returnNULL; | |
| } |
It only shows the last error and swallows any others.
I propose to change the error handling with the smallest possible diff.
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error