]> granicus.if.org Git - python/commitdiff
Minor wording and spacing nits.
authorRaymond Hettinger <python@rcn.com>
Sat, 12 Jun 2004 07:59:40 +0000 (07:59 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 12 Jun 2004 07:59:40 +0000 (07:59 +0000)
Doc/lib/libcollections.tex
Doc/lib/libitertools.tex

index c7d5c508d3e53c0345d2ef43c98d6c1cd9654131..84cc507cb8de2343907fc482151bf74e90b387b8 100644 (file)
@@ -135,12 +135,10 @@ deque(['c', 'b', 'a'])
 This section shows various approaches to working with deques.
 
 The \method{rotate()} method provides a way to implement \class{deque}
-slicing and deletion:
-
-This pure python implementation of \code{del d[n]} shows how to use the
-\method{rotate()} method as a building block for implementing a variety
-of class{deque} operations:
-
+slicing and deletion.  For example, a pure python implementation of
+\code{del d[n]} relies on the \method{rotate()} method to position
+elements to be popped:
+    
 \begin{verbatim}
 def delete_nth(d, n):
     d.rotate(-n)
@@ -188,9 +186,9 @@ h
 
 
 Multi-pass data reduction algorithms can be succinctly expressed and
-efficiently coded by extracting elements using multiple calls to
-\method{popleft()}, applying the reduction function, and using
-\method{append()} for adding the result back to the queue.
+efficiently coded by extracting elements with multiple calls to
+\method{popleft()}, applying the reduction function, and calling
+\method{append()} to add the result back to the queue.
 
 For example, building a balanced binary tree of nested lists entails
 reducing two adjacent nodes into one by grouping them in a list:
index 1909592f44a713ade7e52fc44b1af8d07b2f17ed..b73ffcef923a313969deb0c320a9993a97853e51 100644 (file)
@@ -476,7 +476,6 @@ def padnone(seq):
     """Returns the sequence elements and then returns None indefinitely.
 
     Useful for emulating the behavior of the built-in map() function.
-
     """
     return chain(seq, repeat(None))
 
@@ -494,7 +493,6 @@ def repeatfunc(func, times=None, *args):
     """Repeat calls to func with specified arguments.
     
     Example:  repeatfunc(random.random)
-    
     """
     if times is None:
         return starmap(func, repeat(args))