[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-03-18 Thread Irit Katriel
Irit Katriel added the comment: We should make throw accept an exception instance, the same thing was done in the traceback module. -- ___ Python tracker ___

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-03-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: I have a side question. generator.throw() and coroutine.throw() have throw(type[, value[, traceback]]) signature. Is there a plan to update generators somehow to accept the exception value only? The change can go in line with other exception API changes. ---

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Irit Katriel
Irit Katriel added the comment: Yes, you’re right of course ;) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Eric Snow
Eric Snow added the comment: Why not `PyAPI_FUNC(PyObject *) PyErr_GetActiveException(void);`? -- nosy: +eric.snow ___ Python tracker ___ _

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +28733 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30531 ___ Python tracker ___ ___

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Irit Katriel
New submission from Irit Katriel : Following the removal of exc_type and exc_traceback from the interpreter's active exception in issue45711, we can now provide simplified get-set functions in the C Api: PyAPI_FUNC(void) PyErr_GetActiveException(PyObject **); PyAPI_FUNC(void) PyErr_SetActiveE