Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
dadf93c9
Commit
dadf93c9
authored
Dec 05, 2010
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Note the updates to range objects.
parent
74673513
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
23 deletions
+30
-23
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.2.rst
+30
-23
No files found.
Doc/whatsnew/3.2.rst
View file @
dadf93c9
...
...
@@ -394,9 +394,16 @@ Some smaller changes made to the core Python language are:
(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
...
...
@@ -730,16 +737,6 @@ Optimizations
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.
...
...
@@ -754,16 +751,10 @@ A number of small performance enhancements have been added:
(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`.
(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
several times faster.
(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
...
...
@@ -777,6 +768,21 @@ A number of small performance enhancements have been added:
(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
=======
...
...
@@ -824,7 +830,8 @@ systems.
.. 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment