From: Terry Jan Reedy Date: Fri, 10 Oct 2014 17:02:55 +0000 (-0400) Subject: Issue #22575: Revise bytearray entry for 2.7. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c305ad73501c49a140bc1a7f7cbc3ccfe227c7ae;p=python Issue #22575: Revise bytearray entry for 2.7. --- 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.