Skip to content

Commit f6b9710

Browse files
Document
1 parent 8594d2c commit f6b9710

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/library/codecs.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ any codec:
5353
:exc:`UnicodeDecodeError`). Refer to :ref:`codec-base-classes` for more
5454
information on codec error handling.
5555

56+
.. function:: charmap_build(string)
57+
58+
Return a mapping suitable for decoding a custom single-byte encoding.
59+
Given a string *string* of up to 256 characters representing an encoding
60+
table, returns either a compact internal mapping object or a dictionary
61+
mapping character ordinals to byte values. Raises a :exc:`TypeError`
62+
on invalid input.
63+
5664
The full details for each codec can also be looked up directly:
5765

5866
.. function:: lookup(encoding, /)

0 commit comments

Comments
 (0)