[Python-checkins] cpython (merge 3.5 -> 3.6): Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C API.

serhiy.storchaka python-checkins at python.org
Sun Nov 20 10:21:55 EST 2016


https://hg.python.org/cpython/rev/0c6fccf04a79
changeset: 105220:0c6fccf04a79
branch: 3.6
parent: 105217:efe2993b20e2
parent: 105219:059b8e15b738
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sun Nov 20 17:21:04 2016 +0200
summary:
 Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C API.
Patch by Xiang Zhang.
files:
 Doc/c-api/unicode.rst | 12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -1296,16 +1296,15 @@
 
 .. c:function:: PyObject* PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
 
- Encode a Unicode object using Unicode-Escape and return the result as Python
- string object. Error handling is "strict". Return *NULL* if an exception was
+ Encode a Unicode object using Unicode-Escape and return the result as a
+ bytes object. Error handling is "strict". Return *NULL* if an exception was
 raised by the codec.
 
 
 .. c:function:: PyObject* PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s, Py_ssize_t size)
 
 Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Unicode-Escape and
- return a Python string object. Return *NULL* if an exception was raised by the
- codec.
+ return a bytes object. Return *NULL* if an exception was raised by the codec.
 
 .. deprecated-removed:: 3.3 4.0
 Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
@@ -1328,7 +1327,7 @@
 .. c:function:: PyObject* PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
 
 Encode a Unicode object using Raw-Unicode-Escape and return the result as
- Python string object. Error handling is "strict". Return *NULL* if an exception
+ a bytes object. Error handling is "strict". Return *NULL* if an exception
 was raised by the codec.
 
 
@@ -1336,8 +1335,7 @@
 Py_ssize_t size, const char *errors)
 
 Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-Escape
- and return a Python string object. Return *NULL* if an exception was raised by
- the codec.
+ and return a bytes object. Return *NULL* if an exception was raised by the codec.
 
 .. deprecated-removed:: 3.3 4.0
 Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /