diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-23 16:20:51 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-23 16:20:51 (GMT) |
commit | a4d170d985df52d3fedf908c158824c057c9b7c6 (patch) | |
tree | d0b3bf3468ab6c79a62fa85da6bf4a966a59cb62 /Doc/library/itertools.rst | |
parent | eaedaeccf275d5e8cb3443c50323e57dee60a204 (diff) | |
download | cpython-a4d170d985df52d3fedf908c158824c057c9b7c6.zip cpython-a4d170d985df52d3fedf908c158824c057c9b7c6.tar.gz cpython-a4d170d985df52d3fedf908c158824c057c9b7c6.tar.bz2 |
Removed spaces before commas and periods.
Diffstat (limited to 'Doc/library/itertools.rst')
-rw-r--r-- | Doc/library/itertools.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 6929192..c0da2d1 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -56,7 +56,7 @@ chain.from_iterable iterable p0, p1, ... plast, q0, q :func:`islice` seq, [start,] stop [, step] elements from seq[start:stop:step] ``islice('ABCDEFG', 2, None) --> C D E F G`` :func:`starmap` func, seq func(\*seq[0]), func(\*seq[1]), ... ``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000`` :func:`takewhile` pred, seq seq[0], seq[1], until pred fails ``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4`` -:func:`tee` it, n it1, it2 , ... itn splits one iterator into n +:func:`tee` it, n it1, it2, ... itn splits one iterator into n :func:`zip_longest` p, q, ... (p[0], q[0]), (p[1], q[1]), ... ``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-`` ==================== ============================ ================================================= ============================================================= @@ -131,7 +131,7 @@ loops that truncate the stream. >>> inputs = repeat(x0, 36) # only the initial value is used >>> [format(x, '.2f') for x in accumulate(inputs, logistic_map)] ['0.40', '0.91', '0.30', '0.81', '0.60', '0.92', '0.29', '0.79', '0.63', - '0.88' ,'0.39', '0.90', '0.33', '0.84', '0.52', '0.95', '0.18', '0.57', + '0.88', '0.39', '0.90', '0.33', '0.84', '0.52', '0.95', '0.18', '0.57', '0.93', '0.25', '0.71', '0.79', '0.63', '0.88', '0.39', '0.91', '0.32', '0.83', '0.54', '0.95', '0.20', '0.60', '0.91', '0.30', '0.80', '0.60'] |