FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C… · python/cpython@cf36835 · GitHub

Repository navigation

Commit cf36835

Browse files
Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C API.
Patch by Xiang Zhang.
1 parent 6770f8a commit cf36835

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎Doc/c-api/unicode.rst‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,16 +1291,15 @@ These are the "Unicode Escape" codec APIs:
12911291
12921292
.. c:function:: PyObject* PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
12931293
1294-
Encode a Unicode object using Unicode-Escape and return the result as Python
1295-
string object. Error handling is "strict". Return *NULL* if an exception was
1294+
Encode a Unicode object using Unicode-Escape and return the result as a
1295+
bytes object. Error handling is "strict". Return *NULL* if an exception was
12961296
raised by the codec.
12971297
12981298
12991299
.. c:function:: PyObject* PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s, Py_ssize_t size)
13001300
13011301
Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Unicode-Escape and
1302-
return a Python string object. Return *NULL* if an exception was raised by the
1303-
codec.
1302+
return a bytes object. Return *NULL* if an exception was raised by the codec.
13041303
13051304
.. deprecated-removed:: 3.3 4.0
13061305
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
@@ -1323,16 +1322,15 @@ These are the "Raw Unicode Escape" codec APIs:
13231322
.. c:function:: PyObject* PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
13241323
13251324
Encode a Unicode object using Raw-Unicode-Escape and return the result as
1326-
Python string object. Error handling is "strict". Return *NULL* if an exception
1325+
a bytes object. Error handling is "strict". Return *NULL* if an exception
13271326
was raised by the codec.
13281327
13291328
13301329
.. c:function:: PyObject* PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s, \
13311330
Py_ssize_t size, const char *errors)
13321331
13331332
Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-Escape
1334-
and return a Python string object. Return *NULL* if an exception was raised by
1335-
the codec.
1333+
and return a bytes object. Return *NULL* if an exception was raised by the codec.
13361334
13371335
.. deprecated-removed:: 3.3 4.0
13381336
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL