From c305ad73501c49a140bc1a7f7cbc3ccfe227c7ae Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 10 Oct 2014 13:02:55 -0400 Subject: [PATCH] Issue #22575: Revise bytearray entry for 2.7. --- Doc/library/functions.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 82c1e64849..c4d1eaa40b 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -119,9 +119,9 @@ available. They are listed here in alphabetical order. The optional *source* parameter can be used to initialize the array in a few different ways: - * If it is a *string*, you must also give the *encoding* (and optionally, - *errors*) parameters; :func:`bytearray` then converts the string to - bytes using :meth:`str.encode`. + * If it is *unicode*, you must also give the *encoding* (and optionally, + *errors*) parameters; :func:`bytearray` then converts the unicode to + bytes using :meth:`unicode.encode`. * If it is an *integer*, the array will have that size and will be initialized with null bytes. -- 2.50.1