This is a follow-up to #123380 (comment).
The idea is to add assertion type-checks when calling helper functions on unicode objects:
assert(PyObject_TypeCheck(exc, (PyTypeObject*)&PyExc_UnicodeError));
This is a minor feature, which does not need previous discussion elsewhere
No response
gh-127691: add type checks when using `PyUnicodeError` objects (GH-12…
Thank you for the fix! Do you want to add more, or should we close the issue?
I don't think I'll add more for this specific task. If I find something else I forgot, I'll just reuse it. I'll close this one as completed. Thanks for the merge!
pythongh-127691: add type checks when using `PyUnicodeError` objects (p…
Activity
gh-127691: add type checks when using `PyUnicodeError` objects (GH-12…
encukou commented on Dec 13, 2024
Thank you for the fix!
Do you want to add more, or should we close the issue?
picnixz commented on Dec 13, 2024
I don't think I'll add more for this specific task. If I find something else I forgot, I'll just reuse it. I'll close this one as completed. Thanks for the merge!
pythongh-127691: add type checks when using `PyUnicodeError` objects (p…