From: Benjamin Peterson Date: Sun, 18 Jan 2009 01:28:09 +0000 (+0000) Subject: bytearrays are mutable sequences X-Git-Tag: v2.7a1~2270 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1a4069481e7a69431fab79b974769434130da6e;p=python bytearrays are mutable sequences --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 068f0fdae2..3d7e0be034 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -368,12 +368,20 @@ Sequences comma-separated list of expressions in square brackets. (Note that there are no special cases needed to form lists of length 0 or 1.) + Byte Arrays + .. index:: bytearray + + A bytearray object is a mutable array. They are created by the built-in + :func:`bytearray` constructor. Aside from being mutable (and hence + unhashable), byte arrays otherwise provide the same interface and + functionality as immutable bytes objects. + .. index:: module: array The extension module :mod:`array` provides an additional example of a mutable sequence type. -Set types +Set types../ .. index:: builtin: len object: set type