1# AUTO-GENERATED FILE -- DO NOT EDIT
2
3""" Functional tools for creating and using iterators.
4
5Infinite iterators:
6count([n]) --> n, n+1, n+2, ...
7cycle(p) --> p0, p1, ... plast, p0, p1, ...
8repeat(elem [,n]) --> elem, elem, elem, ... endlessly or up to n times
9
10Iterators terminating on the shortest input sequence:
11chain(p, q, ...) --> p0, p1, ... plast, q0, q1, ...
12compress(data, selectors) --> (d[0] if s[0]), (d[1] if s[1]), ...
13dropwhile(pred, seq) --> seq[n], seq[n+1], starting when pred fails
14groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of keyfunc(v)
15ifilter(pred, seq) --> elements of seq where pred(elem) is True
16ifilterfalse(pred, seq) --> elements of seq where pred(elem) is False
17islice(seq, [start,] stop [, step]) --> elements from
18       seq[start:stop:step]
19imap(fun, p, q, ...) --> fun(p0, q0), fun(p1, q1), ...
20starmap(fun, seq) --> fun(*seq[0]), fun(*seq[1]), ...
21tee(it, n=2) --> (it1, it2 , ... itn) splits one iterator into n
22takewhile(pred, seq) --> seq[0], seq[1], until pred fails
23izip(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ...
24izip_longest(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ...
25
26Combinatoric generators:
27product(p, q, ... [repeat=1]) --> cartesian product
28permutations(p[, r])
29combinations(p, r)
30combinations_with_replacement(p, r)
31 """
32
33__package__ = None
34
35class chain(object):
36  """ chain(*iterables) --> chain object
37
38  Return a chain object whose .next() method returns elements from the
39  first iterable until it is exhausted, then elements from the next
40  iterable, until all of the iterables are exhausted. """
41
42  def from_iterable(self, iterable):
43    """ chain.from_iterable(iterable) --> chain object
44
45    Alternate chain() contructor taking a single iterable argument
46    that evaluates lazily. """
47    return None
48
49  def next(self):
50    """ x.next() -> the next value, or raise StopIteration """
51    return None
52
53class combinations(object):
54  """ combinations(iterable, r) --> combinations object
55
56  Return successive r-length combinations of elements in the iterable.
57
58  combinations(range(4), 3) --> (0,1,2), (0,1,3), (0,2,3), (1,2,3) """
59
60  def next(self):
61    """ x.next() -> the next value, or raise StopIteration """
62    return None
63
64class combinations_with_replacement(object):
65  """ combinations_with_replacement(iterable, r) --> combinations_with_replacement object
66
67  Return successive r-length combinations of elements in the iterable
68  allowing individual elements to have successive repeats.
69  combinations_with_replacement('ABC', 2) --> AA AB AC BB BC CC """
70
71  def next(self):
72    """ x.next() -> the next value, or raise StopIteration """
73    return None
74
75class compress(object):
76  """ compress(data, selectors) --> iterator over selected data
77
78  Return data elements corresponding to true selector elements.
79  Forms a shorter iterator from selected data elements using the
80  selectors to choose the data elements. """
81
82  def next(self):
83    """ x.next() -> the next value, or raise StopIteration """
84    return None
85
86class count(object):
87  """ count(start=0, step=1) --> count object
88
89  Return a count object whose .next() method returns consecutive values.
90  Equivalent to:
91
92      def count(firstval=0, step=1):
93      x = firstval
94      while 1:
95          yield x
96          x += step
97   """
98
99  def next(self):
100    """ x.next() -> the next value, or raise StopIteration """
101    return None
102
103class cycle(object):
104  """ cycle(iterable) --> cycle object
105
106  Return elements from the iterable until it is exhausted.
107  Then repeat the sequence indefinitely. """
108
109  def next(self):
110    """ x.next() -> the next value, or raise StopIteration """
111    return None
112
113class dropwhile(object):
114  """ dropwhile(predicate, iterable) --> dropwhile object
115
116  Drop items from the iterable while predicate(item) is true.
117  Afterwards, return every element until the iterable is exhausted. """
118
119  def next(self):
120    """ x.next() -> the next value, or raise StopIteration """
121    return None
122
123class groupby(object):
124  """ groupby(iterable[, keyfunc]) -> create an iterator which returns
125  (key, sub-iterator) grouped by each value of key(value).
126   """
127
128  def next(self):
129    """ x.next() -> the next value, or raise StopIteration """
130    return None
131
132class filterfalse(object):
133  """ filterfalse(function or None, sequence) --> ifilterfalse object
134
135  Return those items of sequence for which function(item) is false.
136  If function is None, return the items that are false. """
137
138  def next(self):
139    """ x.next() -> the next value, or raise StopIteration """
140    return None
141
142class slice(object):
143  """ slice(iterable, [start,] stop [, step]) --> islice object
144
145  Return an iterator whose next() method returns selected values from an
146  iterable.  If start is specified, will skip all preceding elements;
147  otherwise, start defaults to zero.  Step defaults to one.  If
148  specified as another value, step determines how many values are
149  skipped between successive calls.  Works like a slice() on a list
150  but returns an iterator. """
151
152  def next(self):
153    """ x.next() -> the next value, or raise StopIteration """
154    return None
155
156class zip_longest(object):
157  """ zip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> izip_longest object
158
159  Return a zip_longest object whose .next() method returns a tuple where
160  the i-th element comes from the i-th iterable argument.  The .next()
161  method continues until the longest iterable in the argument sequence
162  is exhausted and then it raises StopIteration.  When the shorter iterables
163  are exhausted, the fillvalue is substituted in their place.  The fillvalue
164  defaults to None or can be specified by a keyword argument.
165   """
166
167  def next(self):
168    """ x.next() -> the next value, or raise StopIteration """
169    return None
170
171class permutations(object):
172  """ permutations(iterable[, r]) --> permutations object
173
174  Return successive r-length permutations of elements in the iterable.
175
176  permutations(range(3), 2) --> (0,1), (0,2), (1,0), (1,2), (2,0), (2,1) """
177
178  def next(self):
179    """ x.next() -> the next value, or raise StopIteration """
180    return None
181
182class product(object):
183  """ product(*iterables) --> product object
184
185  Cartesian product of input iterables.  Equivalent to nested for-loops.
186
187  For example, product(A, B) returns the same as:  ((x,y) for x in A for y in B).
188  The leftmost iterators are in the outermost for-loop, so the output tuples
189  cycle in a manner similar to an odometer (with the rightmost element changing
190  on every iteration).
191
192  To compute the product of an iterable with itself, specify the number
193  of repetitions with the optional repeat keyword argument. For example,
194  product(A, repeat=4) means the same as product(A, A, A, A).
195
196  product('ab', range(3)) --> ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)
197  product((0,1), (0,1), (0,1)) --> (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ... """
198
199  def next(self):
200    """ x.next() -> the next value, or raise StopIteration """
201    return None
202
203class repeat(object):
204  """ repeat(object [,times]) -> create an iterator which returns the object
205  for the specified number of times.  If not specified, returns the object
206  endlessly. """
207
208  def next(self):
209    """ x.next() -> the next value, or raise StopIteration """
210    return None
211
212class starmap(object):
213  """ starmap(function, sequence) --> starmap object
214
215  Return an iterator whose values are returned from the function evaluated
216  with a argument tuple taken from the given sequence. """
217
218  def next(self):
219    """ x.next() -> the next value, or raise StopIteration """
220    return None
221
222class takewhile(object):
223  """ takewhile(predicate, iterable) --> takewhile object
224
225  Return successive entries from an iterable as long as the
226  predicate evaluates to true for each entry. """
227
228  def next(self):
229    """ x.next() -> the next value, or raise StopIteration """
230    return None
231
232def tee(iterable, n=2):
233  """ tee(iterable, n=2) --> tuple of n independent iterators. """
234  return ()
235
236