Commits

Anonymous committed 69a50ba

Note the updates to range objects.

  • Participants
  • Parent commits 073176f

Comments (0)

Files changed (1)

File Doc/whatsnew/3.2.rst

 
   (Added by Antoine Pitrou, :issue:`10093`.)
 
-.. XXX: Issues #9213 and #2690 make the objects returned by range()
-        more sequence like in accordance with their registration as
-        implementing the Sequence ABC
+* :class:`range` objects now support and *index* and *count* methods. This is
+  part of an effort to make more objects fully implement the :class:`collections.Sequence`
+  :term:`abstract base class`.  As a result, the language will have a more
+  uniform API.
+
+  In addition, :class:`range` objects now support slicing and negative indices.
+  This makes *range* more interoperable with lists.
+
+  (Contributed by Daniel Stuzback in :issue:`9213` and by Alexander Belopolsky
+  in :issue:`2690`.)
 
 
 New, Improved, and Deprecated Modules
 
 A number of small performance enhancements have been added:
 
-* JSON decoding performance is improved and memory consumption is reduced
-  whenever the same string is repeated for multiple keys.
-
-  (Contributed by Antoine Pitrou; :issue:`7451`.)
-
-* JSON encoding now uses the C speedups also when the ``sort_keys`` argument
-  is true.
-
-  (Contributed by Raymond Hettinger and Antoine Pitrou, :issue:`10314`.)
-
 * Python's peephole optimizer now recognizes patterns such ``x in {1, 2, 3}`` as
   being a test for membership in a set of constants.  The optimizer recasts the
   :class:`set` as a :class:`frozenset` and stores the pre-built constant.
 
   (Patch and additional tests by Dave Malcolm; :issue:`6690`).
 
-* The fast-search algorithm in stringlib is now used by the :meth:`split`,
-  :meth:`rsplit`, :meth:`splitlines` and :meth:`replace` methods on
-  :class:`bytes`, :class:`bytearray` and :class:`str` objects. Likewise, the
-  algorithm is also used by :meth:`rfind`, :meth:`rindex`, :meth:`rsplit` and
-  :meth:`rpartition`.
+* Serializing and unserializing data using the :mod:`pickle` module is now
+  several times faster.
 
-  (Patch by Florent Xicluna in :issue:`7622` and :issue:`7462`.)
-
-* Serializing and unserializing data using the :mod:`pickle` module is now
-  several times faster. (Contributed by Alexandre Vassalotti, Antoine Pitrou
+  (Contributed by Alexandre Vassalotti, Antoine Pitrou
   and the Unladen Swallow team in :issue:`9410` and :issue:`3873`.)
 
 * The `Timsort algorithm <http://en.wikipedia.org/wiki/Timsort>`_ used in
 
   (Patch by Daniel Stuzback in :issue:`9915`.)
 
+* JSON decoding performance is improved and memory consumption is reduced
+  whenever the same string is repeated for multiple keys.  Aslo, JSON encoding
+  now uses the C speedups when the ``sort_keys`` argument is true.
+
+  (Contributed by Antoine Pitrou in :issue:`7451` and by Raymond Hettinger and
+  Antoine Pitrou in :issue:`10314`.)
+
+* The fast-search algorithm in stringlib is now used by the :meth:`split`,
+  :meth:`rsplit`, :meth:`splitlines` and :meth:`replace` methods on
+  :class:`bytes`, :class:`bytearray` and :class:`str` objects. Likewise, the
+  algorithm is also used by :meth:`rfind`, :meth:`rindex`, :meth:`rsplit` and
+  :meth:`rpartition`.
+
+  (Patch by Florent Xicluna in :issue:`7622` and :issue:`7462`.)
+
 
 Unicode
 =======
 .. IDLE
    ====
 
-   * Stub
+* The format menu now has an option to clean-up source files by strip trailing
+  whitespace (:issue:`5150`).
 
 
 Build and C API Changes