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
6c2633e9
Commit
6c2633e9
authored
Mar 30, 2009
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more items
parent
efa97718
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
4 deletions
+46
-4
Doc/whatsnew/2.7.rst
Doc/whatsnew/2.7.rst
+46
-4
No files found.
Doc/whatsnew/2.7.rst
View file @
6c2633e9
...
...
@@ -56,19 +56,31 @@ No release schedule has been decided yet for 2.7.
.. Compare with previous release in 2 - 3 sentences here.
add hyperlink when the documentation becomes available online.
Python 3.1
================
Much as Python 2.6 incorporated features from Python 3.0,
version 2.7 is influenced by features from 3.1.
XXX mention importlib; anything else?
One porting change: the :option:`-3` switch now automatically
enables the :option:`-Qwarn` switch that causes warnings
about using classic division with integers and long integers.
.. ========================================================================
.. Large, PEP-level features and changes should be described here.
.. ========================================================================
PEP 372: Adding an ordered dictionary to collections
=============================
=============================
=======================
XXX write this
Several modules will now use :class:`OrderedDict` by default. The
:mod:`ConfigParser` module uses :class:`OrderedDict` for the list
of sections and the options within a section.
The :meth
od
:`namedtuple._asdict` method returns an :class:`OrderedDict`
The :meth:`namedtuple._asdict` method returns an :class:`OrderedDict`
as well.
...
...
@@ -143,9 +155,12 @@ A few performance enhancements have been added:
>>> sys.long_info
sys.long_info(bits_per_digit=30, sizeof_digit=4)
(Contributed by Mark Dickinson; :issue:`4258`.)
Another set of changes made long objects a few bytes smaller: 2 bytes
smaller on 32-bit systems and 6 bytes on 64-bit. (:
(Contributed by Mark Dickinson; :issue:`5260`.)
* The division algorithm for long integers has been made faster
by tightening the inner loop, doing shifts instead of multiplications,
and fixing an unnecessary extra iteration.
...
...
@@ -223,7 +238,31 @@ changes, or look through the Subversion logs for all the details.
an invalid file descriptor. (Implemented by Benjamin Peterson;
:issue:`4991`.)
* The :class:`itertools`
* New function: ``itertools.compress(*data*, *selectors*)`` takes two
iterators. Elements of *data* are returned if the corresponding
value in *selectors* is True::
itertools.compress('ABCDEF', [1,0,1,0,1,1]) =>
A, C, E, F
New function: ``itertools.combinations_with_replacement(*iter*, *r*)``
returns all the possible *r*-length combinations of elements from the
iterable *iter*. Unlike :func:`combinations`, individual elements
can be repeated in the generated combinations::
itertools.combinations_with_replacement('abc', 2) =>
('a', 'a'), ('a', 'b'), ('a', 'c'),
('b', 'b'), ('b', 'c'), ('c', 'c')
Note that elements are treated as unique depending on their position
in the input, not their actual values.
The :class:`itertools.count` function now has a *step* argument that
allows incrementing by values other than 1. :func:`count` also
now allows keyword arguments, and using non-integer values such as
floats or :class:`Decimal` instances. (Implemented by Raymond
Hettinger; :issue:`5032`.)
* The :mod:`json` module was upgraded to version 2.0.9 of the
simplejson package, which includes a C extension that makes
encoding and decoding faster.
...
...
@@ -266,6 +305,9 @@ changes, or look through the Subversion logs for all the details.
accept a file object, in addition to the path names accepted in earlier
versions. (Contributed by Gabriel Genellina; :issue:`4756`.)
:mod:`zipfile` now supports archiving empty directories and
extracts them correctly. (Fixed by Kuba Wieczorek; :issue:`4710`.)
.. ======================================================================
.. whole new modules get described in subsections here
...
...
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