Commits

Nick Coghlan  committed ae45386

Additional fixes

  • Participants
  • Parent commits 2da4422
  • Branches seq_docs_update

Comments (0)

Files changed (1)

File Doc/library/stdtypes.rst

    object: list
    object: bytearray
 
-Mutable sequences, such as :class:`list`, support additional operations that
-allow in-place modification of the object. With the exception of
-:meth:`list.sort`, custom mutable sequence types are also expected to
-provide these operations.
-
 The operations in the following table are defined on mutable sequence types.
 The :class:`collections.abc.MutableSequence` ABC is provided to make it
 easier to correctly implement these operations on custom sequence types.
    single: pop() (sequence method)
    single: remove() (sequence method)
    single: reverse() (sequence method)
-   single: sort() (sequence method)
 
 +------------------------------+--------------------------------+---------------------+
 | Operation                    | Result                         | Notes               |
 Tuples implement all of the :ref:`common <typesseq-common>` sequence
 operations.
 
+For heterogeneous collections of data, :func:`collections.namedtuple` may
+be more appropriate than a simple tuple object.
+
 
 .. _typesseq-range:
 
 :class:`io.StringIO` can be used to efficiently construct strings from
 multiple fragments.
 
+.. versionchanged:: 3.3
+   For backwards compatibility with the Python 2 series, the ``u`` prefix is
+   once again permitted on string literals. It has no effect on the meaning
+   of string literals and cannot be combined with the ``r`` prefix.
 
 .. _string-methods:
 
 since it is often more useful than e.g. ``bytes([46, 46, 46])``.  You can
 always convert a bytes object into a list of integers using ``list(b)``.
 
-Note for Python 2.x users: In the Python 2.x series, a variety of implicit
-conversions between 8-bit strings (the closest thing 2.x offers to a built-in
-binary data type) and Unicode strings were permitted. This was a backwards
-compatibility workaround to account for the fact that Python originally only
-supported 8-bit text, and Unicode text was a later addition. In Python 3.x,
-those implicit conversions are gone - conversions between 8-bit binary data
-and Unicode text must be explicit, and bytes and string objects will always
-compare unequal.
+
+.. note::
+   For Python 2.x users: In the Python 2.x series, a variety of implicit
+   conversions between 8-bit strings (the closest thing 2.x offers to a
+   built-in binary data type) and Unicode strings were permitted. This was a
+   backwards compatibility workaround to account for the fact that Python
+   originally only supported 8-bit text, and Unicode text was a later
+   addition. In Python 3.x, those implicit conversions are gone - conversions
+   between 8-bit binary data and Unicode text must be explicit, and bytes and
+   string objects will always compare unequal.
 
 
 .. _typebytearray:
 
 The search operations (:keyword:`in`, :meth:`count`, :meth:`find`,
 :meth:`index`, :meth:`rfind` and :meth:`rindex`) all accept both integers
-in the range 0 to 255 as well bytes and byte array sequences.
+in the range 0 to 255 as well as bytes and byte array sequences.
 
 .. versionchanged:: 3.3
-   All of the search methods accept an integer in range 0 to 255 (a byte) as
-   their first argument, not just containment testing.
+   All of the search methods also accept an integer in range 0 to 255
+   (a byte) as their first argument.
 
 
 Each bytes and bytearray instance provides a :meth:`decode` convenience