Skip to content

PyUnicode_DecodeCharmap: mapping argument not fully documented #156098

Description

@srittau

Documentation

PyUnicode_DecodeCharmap has a mapping argument that either takes a mapping or a str:

if (PyUnicode_CheckExact(mapping)) {
if (charmap_decode_string(s, size, mapping, errors, &writer) < 0)
goto onError;
}
else {
if (charmap_decode_mapping(s, size, mapping, errors, &writer) < 0)
goto onError;
}

That it takes a str is not documented: https://docs.python.org/3/c-api/unicode.html#character-map-codecs

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions