Skip to content

Check for type consistency for PyUnicodeError API #127691

Closed
@picnixz

Description

@picnixz

Feature or enhancement

Proposal:

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));

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions