[Python-checkins] cpython (2.7): Issue #22575: Revise bytearray entry for 2.7.

terry.reedy python-checkins at python.org
Fri Oct 10 19:03:16 CEST 2014


https://hg.python.org/cpython/rev/0c75819f1d86
changeset:   92928:0c75819f1d86
branch:      2.7
parent:      92906:9336b470544b
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Fri Oct 10 13:02:55 2014 -0400
summary:
  Issue #22575: Revise bytearray entry for 2.7.

files:
  Doc/library/functions.rst |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -119,9 +119,9 @@
    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.

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list