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
Documentation
PyUnicode_DecodeCharmaphas amappingargument that either takes a mapping or astr:cpython/Objects/unicodeobject.c
Lines 8826 to 8833 in e8158d1
That it takes a
stris not documented: https://docs.python.org/3/c-api/unicode.html#character-map-codecsLinked PRs
strform ofPyUnicode_DecodeCharmap()'smapping argument #156147