Commit Graph

38 Commits

Author SHA1 Message Date
Raymond Hettinger
a531e5b84c Guarantee evaluation order for izip(). Document its creative uses and its limitations. 2006-03-26 01:41:25 +00:00
Georg Brandl
db815abc70 More \exception fixes. 2006-03-17 16:26:31 +00:00
Raymond Hettinger
1b2e0d9da0 Fix whitespace. 2005-03-27 20:19:05 +00:00
Raymond Hettinger
fdf3bd6630 SF patch #1171417: bug fix for islice() in docs 2005-03-27 20:11:44 +00:00
Raymond Hettinger
f77d0334f3 Revised the itertools quantifier recipes to match the performance of the
new builtins.
2005-03-11 22:17:30 +00:00
Raymond Hettinger
b2594050ea Added optional None arguments to itertools.islice(). 2004-12-05 09:25:51 +00:00
Raymond Hettinger
4533f1fb7f Improve three recipes in the itertools docs. 2004-09-23 07:27:39 +00:00
Raymond Hettinger
88e8e34ab0 Style nit. 2004-07-11 13:20:11 +00:00
Raymond Hettinger
2e6694086f Minor wording and spacing nits. 2004-06-12 07:59:40 +00:00
Raymond Hettinger
d7911a3317 Minor documentation nits. 2004-05-01 08:31:36 +00:00
Raymond Hettinger
734fb5724f Add a Guido inspired example for groupby(). 2004-01-20 20:04:40 +00:00
Andrew M. Kuchling
3435820842 Fix typo 2003-12-18 13:28:35 +00:00
Raymond Hettinger
64958a15d7 Guido grants a Christmas wish:
sorted() becomes a regular function instead of a classmethod.
2003-12-17 20:43:33 +00:00
Raymond Hettinger
ff294fea40 SF patch #855195: fix typos
(Contributed by George Yoshida.)
2003-12-07 13:00:25 +00:00
Andrew M. Kuchling
db7dcffa27 Edit description a bit 2003-12-06 22:29:43 +00:00
Raymond Hettinger
d25c1c6351 Implement itertools.groupby()
Original idea by Guido van Rossum.
Idea for skipable inner iterators by Raymond Hettinger.
Idea for argument order and identity function default by Alex Martelli.
Implementation by Hye-Shik Chang (with tweaks by Raymond Hettinger).
2003-12-06 16:23:06 +00:00
Raymond Hettinger
ad983e79d6 Improve the implementation of itertools.tee().
Formerly, underlying queue was implemented in terms of two lists.  The
new queue is a series of singly-linked fixed length lists.

The new implementation runs much faster, supports multi-way tees, and
allows tees of tees without additional memory costs.

The root ideas for this structure were contributed by Andrew Koenig
and Guido van Rossum.
2003-11-12 14:32:26 +00:00
Raymond Hettinger
d591f666de Replace the window() example with pairwise() which demonstrates tee(). 2003-10-26 15:34:50 +00:00
Raymond Hettinger
6a5b027742 Added itertools.tee()
It works like the pure python verion except:
* it stops storing data after of the iterators gets deallocated
* the data queue is implemented with two stacks instead of one dictionary.
2003-10-24 08:45:23 +00:00
Guido van Rossum
0c9a318d64 Use 'predicate = bool' as the default predicate for ifilter[false]. 2003-10-20 17:01:07 +00:00
Raymond Hettinger
dbe3d280e7 Adopt Christian Stork's suggested argument order for the logic quantifiers.
Adopt Jeremy Fincher's suggested function name, "any", instead of "some".
2003-10-05 16:47:36 +00:00
Raymond Hettinger
7e43110f34 SF 810242. Fix doubled word errors. 2003-09-22 15:00:55 +00:00
Raymond Hettinger
a098b33c93 Add an example to address a common question of how to split iterators. 2003-09-08 23:58:40 +00:00
Raymond Hettinger
9e3864190c Make the derived tools amendable to cut and paste. 2003-08-25 05:06:09 +00:00
Raymond Hettinger
b5a420883c Modified itertools.izip() to match the behavior of __builtin__.zip()
which can now take zero arguments.
2003-08-08 05:10:41 +00:00