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

Skip to content

Commit 2e66940

Browse files
committed
Minor wording and spacing nits.
1 parent 3480917 commit 2e66940

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

Doc/lib/libcollections.tex

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,10 @@ \subsection{Recipes \label{deque-recipes}}
135135
This section shows various approaches to working with deques.
136136

137137
The \method{rotate()} method provides a way to implement \class{deque}
138-
slicing and deletion:
139-
140-
This pure python implementation of \code{del d[n]} shows how to use the
141-
\method{rotate()} method as a building block for implementing a variety
142-
of class{deque} operations:
143-
138+
slicing and deletion. For example, a pure python implementation of
139+
\code{del d[n]} relies on the \method{rotate()} method to position
140+
elements to be popped:
141+
144142
\begin{verbatim}
145143
def delete_nth(d, n):
146144
d.rotate(-n)
@@ -188,9 +186,9 @@ \subsection{Recipes \label{deque-recipes}}
188186

189187

190188
Multi-pass data reduction algorithms can be succinctly expressed and
191-
efficiently coded by extracting elements using multiple calls to
192-
\method{popleft()}, applying the reduction function, and using
193-
\method{append()} for adding the result back to the queue.
189+
efficiently coded by extracting elements with multiple calls to
190+
\method{popleft()}, applying the reduction function, and calling
191+
\method{append()} to add the result back to the queue.
194192

195193
For example, building a balanced binary tree of nested lists entails
196194
reducing two adjacent nodes into one by grouping them in a list:

Doc/lib/libitertools.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ \subsection{Recipes \label{itertools-recipes}}
476476
"""Returns the sequence elements and then returns None indefinitely.
477477
478478
Useful for emulating the behavior of the built-in map() function.
479-
480479
"""
481480
return chain(seq, repeat(None))
482481
@@ -494,7 +493,6 @@ \subsection{Recipes \label{itertools-recipes}}
494493
"""Repeat calls to func with specified arguments.
495494
496495
Example: repeatfunc(random.random)
497-
498496
"""
499497
if times is None:
500498
return starmap(func, repeat(args))

0 commit comments

Comments
 (0)