annotate Doc/c-api/codec.rst @ 80661:94de77bd0b4b 2.7

Issue #16194: document imp.load_dynamic problems when read several extension modules from the same binary object file.
author Andrew Svetlov <andrew.svetlov@gmail.com>
date Thu, 29 Nov 2012 19:51:28 +0200
parents 74ff71b2f53d
children 9b855a701e28
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
1 .. _codec-registry:
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
2
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
3 Codec registry and support functions
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
4 ====================================
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
5
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
6 .. c:function:: int PyCodec_Register(PyObject *search_function)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
7
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
8 Register a new codec search function.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
9
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
10 As side effect, this tries to load the :mod:`encodings` package, if not yet
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
11 done, to make sure that it is always first in the list of search functions.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
12
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
13 .. c:function:: int PyCodec_KnownEncoding(const char *encoding)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
14
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
15 Return ``1`` or ``0`` depending on whether there is a registered codec for
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
16 the given *encoding*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
17
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
18 .. c:function:: PyObject* PyCodec_Encode(PyObject *object, const char *encoding, const char *errors)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
19
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
20 Generic codec based encoding API.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
21
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
22 *object* is passed through the encoder function found for the given
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
23 *encoding* using the error handling method defined by *errors*. *errors* may
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
24 be *NULL* to use the default method defined for the codec. Raises a
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
25 :exc:`LookupError` if no encoder can be found.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
26
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
27 .. c:function:: PyObject* PyCodec_Decode(PyObject *object, const char *encoding, const char *errors)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
28
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
29 Generic codec based decoding API.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
30
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
31 *object* is passed through the decoder function found for the given
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
32 *encoding* using the error handling method defined by *errors*. *errors* may
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
33 be *NULL* to use the default method defined for the codec. Raises a
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
34 :exc:`LookupError` if no encoder can be found.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
35
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
36
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
37 Codec lookup API
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
38 ----------------
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
39
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
40 In the following functions, the *encoding* string is looked up converted to all
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
41 lower-case characters, which makes encodings looked up through this mechanism
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
42 effectively case-insensitive. If no codec is found, a :exc:`KeyError` is set
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
43 and *NULL* returned.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
44
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
45 .. c:function:: PyObject* PyCodec_Encoder(const char *encoding)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
46
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
47 Get an encoder function for the given *encoding*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
48
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
49 .. c:function:: PyObject* PyCodec_Decoder(const char *encoding)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
50
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
51 Get a decoder function for the given *encoding*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
52
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
53 .. c:function:: PyObject* PyCodec_IncrementalEncoder(const char *encoding, const char *errors)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
54
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
55 Get an :class:`IncrementalEncoder` object for the given *encoding*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
56
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
57 .. c:function:: PyObject* PyCodec_IncrementalDecoder(const char *encoding, const char *errors)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
58
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
59 Get an :class:`IncrementalDecoder` object for the given *encoding*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
60
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
61 .. c:function:: PyObject* PyCodec_StreamReader(const char *encoding, PyObject *stream, const char *errors)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
62
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
63 Get a :class:`StreamReader` factory function for the given *encoding*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
64
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
65 .. c:function:: PyObject* PyCodec_StreamWriter(const char *encoding, PyObject *stream, const char *errors)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
66
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
67 Get a :class:`StreamWriter` factory function for the given *encoding*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
68
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
69
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
70 Registry API for Unicode encoding error handlers
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
71 ------------------------------------------------
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
72
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
73 .. c:function:: int PyCodec_RegisterError(const char *name, PyObject *error)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
74
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
75 Register the error handling callback function *error* under the given *name*.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
76 This callback function will be called by a codec when it encounters
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
77 unencodable characters/undecodable bytes and *name* is specified as the error
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
78 parameter in the call to the encode/decode function.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
79
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
80 The callback gets a single argument, an instance of
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
81 :exc:`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
82 :exc:`UnicodeTranslateError` that holds information about the problematic
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
83 sequence of characters or bytes and their offset in the original string (see
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
84 :ref:`unicodeexceptions` for functions to extract this information). The
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
85 callback must either raise the given exception, or return a two-item tuple
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
86 containing the replacement for the problematic sequence, and an integer
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
87 giving the offset in the original string at which encoding/decoding should be
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
88 resumed.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
89
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
90 Return ``0`` on success, ``-1`` on error.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
91
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
92 .. c:function:: PyObject* PyCodec_LookupError(const char *name)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
93
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
94 Lookup the error handling callback function registered under *name*. As a
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
95 special case *NULL* can be passed, in which case the error handling callback
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
96 for "strict" will be returned.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
97
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
98 .. c:function:: PyObject* PyCodec_StrictErrors(PyObject *exc)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
99
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
100 Raise *exc* as an exception.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
101
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
102 .. c:function:: PyObject* PyCodec_IgnoreErrors(PyObject *exc)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
103
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
104 Ignore the unicode error, skipping the faulty input.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
105
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
106 .. c:function:: PyObject* PyCodec_ReplaceErrors(PyObject *exc)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
107
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
108 Replace the unicode encode error with ``?`` or ``U+FFFD``.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
109
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
110 .. c:function:: PyObject* PyCodec_XMLCharRefReplaceErrors(PyObject *exc)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
111
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
112 Replace the unicode encode error with XML character references.
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
113
74395
74ff71b2f53d update to new C roles and directives
Sandro Tosi <sandro.tosi@gmail.com>
parents: 66467
diff changeset
114 .. c:function:: PyObject* PyCodec_BackslashReplaceErrors(PyObject *exc)
66467
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
115
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
116 Replace the unicode encode error with backslash escapes (``\x``, ``\u`` and
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
117 ``\U``).
7c0eb8d56146 Merged revisions 86561-86562,86564-86565,86705,86708,86713 via svnmerge from
Georg Brandl <georg@python.org>
parents:
diff changeset
118