Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d18de0e

Browse files
committed
Merged revisions 65259,65263,65296,65307,65321 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r65259 | benjamin.peterson | 2008-07-27 10:22:14 -0500 (Sun, 27 Jul 2008) | 1 line clarify Popen argument ........ r65263 | andrew.kuchling | 2008-07-28 12:04:48 -0500 (Mon, 28 Jul 2008) | 1 line Clarify wording ........ r65296 | raymond.hettinger | 2008-07-30 02:27:30 -0500 (Wed, 30 Jul 2008) | 1 line Neaten-up the itertools recipes. ........ r65307 | benjamin.peterson | 2008-07-30 08:46:53 -0500 (Wed, 30 Jul 2008) | 1 line getrandombits is actually getrandbits ........ r65321 | raymond.hettinger | 2008-07-30 20:19:50 -0500 (Wed, 30 Jul 2008) | 4 lines Alter recipe to show how to call izip_longest() with both a keyword argument and star arguments. ........
1 parent f17ff4e commit d18de0e

5 files changed

Lines changed: 8 additions & 9 deletions

File tree

Doc/library/itertools.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,7 @@ which incur interpreter overhead.
566566
def grouper(n, iterable, fillvalue=None):
567567
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
568568
args = [iter(iterable)] * n
569-
kwds = dict(fillvalue=fillvalue)
570-
return zip_longest(*args, **kwds)
569+
return zip_longest(fillvalue=fillvalue, *args)
571570
572571
def roundrobin(*iterables):
573572
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"

Doc/library/random.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ instances of :class:`Random` to get generators that don't share state.
3333
Class :class:`Random` can also be subclassed if you want to use a different
3434
basic generator of your own devising: in that case, override the :meth:`random`,
3535
:meth:`seed`, :meth:`getstate`, and :meth:`setstate`.
36-
Optionally, a new generator can supply a :meth:`getrandombits` method --- this
36+
Optionally, a new generator can supply a :meth:`getrandbits` method --- this
3737
allows :meth:`randrange` to produce selections over an arbitrarily large range.
3838

3939

Doc/library/subprocess.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ This module defines one class called :class:`Popen`:
3333

3434
Arguments are:
3535

36-
*args* should be a string, or a sequence of program arguments. The program to
37-
execute is normally the first item in the args sequence or string, but can be
38-
explicitly set by using the executable argument.
36+
*args* should be a string, or a sequence of program arguments. The program
37+
to execute is normally the first item in the args sequence or the string if a
38+
string is given, but can be explicitly set by using the *executable*
39+
argument.
3940

4041
On Unix, with *shell=False* (default): In this case, the Popen class uses
4142
:meth:`os.execvp` to execute the child program. *args* should normally be a

Lib/random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Random(_random.Random):
7474
Class Random can also be subclassed if you want to use a different basic
7575
generator of your own devising: in that case, override the following
7676
methods: random(), seed(), getstate(), and setstate().
77-
Optionally, implement a getrandombits() method so that randrange()
77+
Optionally, implement a getrandbits() method so that randrange()
7878
can cover arbitrarily large ranges.
7979
8080
"""

Lib/test/test_itertools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,8 +1257,7 @@ def __init__(self, newarg=None, *args):
12571257
>>> def grouper(n, iterable, fillvalue=None):
12581258
... "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
12591259
... args = [iter(iterable)] * n
1260-
... kwds = dict(fillvalue=fillvalue)
1261-
... return zip_longest(*args, **kwds)
1260+
... return zip_longest(fillvalue=fillvalue, *args)
12621261
12631262
>>> def roundrobin(*iterables):
12641263
... "roundrobin('ABC', 'D', 'EF') --> A D E B F C"

0 commit comments

Comments
 (0)