summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/itertools.rst3
-rw-r--r--Doc/library/random.rst2
-rw-r--r--Doc/library/subprocess.rst7
-rw-r--r--Lib/random.py2
-rw-r--r--Lib/test/test_itertools.py3
5 files changed, 8 insertions, 9 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 2d7e756..a53988b 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -566,8 +566,7 @@ which incur interpreter overhead.
def grouper(n, iterable, fillvalue=None):
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * n
- kwds = dict(fillvalue=fillvalue)
- return zip_longest(*args, **kwds)
+ return zip_longest(fillvalue=fillvalue, *args)
def roundrobin(*iterables):
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index d8c3f5a..66db882 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -33,7 +33,7 @@ instances of :class:`Random` to get generators that don't share state.
Class :class:`Random` can also be subclassed if you want to use a different
basic generator of your own devising: in that case, override the :meth:`random`,
:meth:`seed`, :meth:`getstate`, and :meth:`setstate`.
-Optionally, a new generator can supply a :meth:`getrandombits` method --- this
+Optionally, a new generator can supply a :meth:`getrandbits` method --- this
allows :meth:`randrange` to produce selections over an arbitrarily large range.
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index daa88b3..bd927c0 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -33,9 +33,10 @@ This module defines one class called :class:`Popen`:
Arguments are:
- *args* should be a string, or a sequence of program arguments. The program to
- execute is normally the first item in the args sequence or string, but can be
- explicitly set by using the executable argument.
+ *args* should be a string, or a sequence of program arguments. The program
+ to execute is normally the first item in the args sequence or the string if a
+ string is given, but can be explicitly set by using the *executable*
+ argument.
On Unix, with *shell=False* (default): In this case, the Popen class uses
:meth:`os.execvp` to execute the child program. *args* should normally be a
diff --git a/Lib/random.py b/Lib/random.py
index e0c015d..70603ca 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -74,7 +74,7 @@ class Random(_random.Random):
Class Random can also be subclassed if you want to use a different basic
generator of your own devising: in that case, override the following
methods: random(), seed(), getstate(), and setstate().
- Optionally, implement a getrandombits() method so that randrange()
+ Optionally, implement a getrandbits() method so that randrange()
can cover arbitrarily large ranges.
"""
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 8c482c5..a0d45e3 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -1257,8 +1257,7 @@ Samuele
>>> def grouper(n, iterable, fillvalue=None):
... "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
... args = [iter(iterable)] * n
-... kwds = dict(fillvalue=fillvalue)
-... return zip_longest(*args, **kwds)
+... return zip_longest(fillvalue=fillvalue, *args)
>>> def roundrobin(*iterables):
... "roundrobin('ABC', 'D', 'EF') --> A D E B F C"