]> granicus.if.org Git - python/commitdiff
bytearrays are mutable sequences
authorBenjamin Peterson <benjamin@python.org>
Sun, 18 Jan 2009 01:28:09 +0000 (01:28 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 18 Jan 2009 01:28:09 +0000 (01:28 +0000)
Doc/reference/datamodel.rst

index 068f0fdae281b6d16874864c62c6a028d990fe1d..3d7e0be0348f63f4a40660e5cedf7310782683e1 100644 (file)
@@ -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