summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-03-06 01:36:27 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-03-06 01:36:27 (GMT)
commit1d136bb91ee0e8a13f94fc456d7488fe3c3ef795 (patch)
treed19554130328e23c29599db1b9b645a58e0efec5
parent040f10e9b3b671343286eaf95c549d3b2fc8a734 (diff)
downloadcpython-1d136bb91ee0e8a13f94fc456d7488fe3c3ef795.zip
cpython-1d136bb91ee0e8a13f94fc456d7488fe3c3ef795.tar.gz
cpython-1d136bb91ee0e8a13f94fc456d7488fe3c3ef795.tar.bz2
Add two items
-rw-r--r--Doc/whatsnew/2.6.rst16
1 files changed, 12 insertions, 4 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 1ee812d..20f17c7 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -1157,7 +1157,7 @@ complete list of changes, or look through the CVS logs for all the details.
(2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4),
(2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)]
- ``combinations(iter, r)`` returns combinations of length *r* from
+ ``combinations(iter, r)`` returns sub-sequences of length *r* from
the elements of *iterable*. ::
itertools.combinations('123', 2) ->
@@ -1170,14 +1170,18 @@ complete list of changes, or look through the CVS logs for all the details.
[('1', '2', '3'), ('1', '2', '4'), ('1', '3', '4'),
('2', '3', '4')]
- ``permutations(iter[, r])`` returns all the permutations of length *r* from
+ ``permutations(iter[, r])`` returns all the permutations of length *r* of
the iterable's elements. If *r* is not specified, it will default to the
number of elements produced by the iterable.
- XXX enter example once Raymond commits the code.
+ itertools.permutations([1,2,3,4], 2) ->
+ [(1, 2), (1, 3), (1, 4),
+ (2, 1), (2, 3), (2, 4),
+ (3, 1), (3, 2), (3, 4),
+ (4, 1), (4, 2), (4, 3)]
``itertools.chain(*iterables)` is an existing function in
- :mod:`itertools` that gained a new constructor.
+ :mod:`itertools` that gained a new constructor in Python 2.6.
``itertools.chain.from_iterable(iterable)`` takes a single
iterable that should return other iterables. :func:`chain` will
then return all the elements of the first iterable, then
@@ -1411,6 +1415,10 @@ complete list of changes, or look through the CVS logs for all the details.
by Michael Pomraning.)
.. Patch #742598
+
+* The :mod:`struct` module now supports the C99 :ctype:`_Bool` type,
+ using the format character ``'?'``.
+ (Contributed by David Remahl.)
* A new variable in the :mod:`sys` module,
:attr:`float_info`, is an object