Skip to content

Commit f212636

Browse files
committed
Issue #19548: clean up merge issues in codecs docs
Patch by Martin Panter to clean up some problems with the merge of the codecs docs changes from Python 3.4.
1 parent 582acb7 commit f212636

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Doc/library/codecs.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ and writing to platform dependent files:
256256
encodings.
257257

258258

259-
.. _surrogateescape:
260259
.. _codec-base-classes:
261260

262261
Codec Base Classes
@@ -273,6 +272,7 @@ implement the file protocols. Codec authors also need to define how the
273272
codec will handle encoding and decoding errors.
274273

275274

275+
.. _surrogateescape:
276276
.. _error-handlers:
277277

278278
Error Handlers
@@ -319,7 +319,8 @@ The following error handlers are only applicable to
319319
| | :func:`backslashreplace_errors`. |
320320
+-------------------------+-----------------------------------------------+
321321
| ``'namereplace'`` | Replace with ``\N{...}`` escape sequences |
322-
| | (only for encoding). |
322+
| | (only for encoding). Implemented in |
323+
| | :func:`namereplace_errors`. |
323324
+-------------------------+-----------------------------------------------+
324325
| ``'surrogateescape'`` | On decoding, replace byte with individual |
325326
| | surrogate code ranging from ``U+DC80`` to |
@@ -422,7 +423,8 @@ functions:
422423

423424
.. function:: namereplace_errors(exception)
424425

425-
Implements the ``namereplace`` error handling (for encoding only): the
426+
Implements the ``'namereplace'`` error handling (for encoding with
427+
:term:`text encodings <text encoding>` only): the
426428
unencodable character is replaced by a ``\N{...}`` escape sequence.
427429

428430
.. versionadded:: 3.5

0 commit comments

Comments
 (0)