summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_itertools.py
Commit message (Collapse)AuthorAgeFilesLines
* Convert iterator __len__() methods to a private API.Raymond Hettinger2005-09-241-0/+1
|
* SF patch #1171417: bug fix for islice() in docsRaymond Hettinger2005-03-271-0/+5
|
* Revised the itertools quantifier recipes to match the performance of theRaymond Hettinger2005-03-111-8/+8
| | | | new builtins.
* Added optional None arguments to itertools.islice().Raymond Hettinger2004-12-051-0/+2
|
* Fix and test weak referencing of itertools.tee objects.Raymond Hettinger2004-10-171-0/+8
|
* Improve test coverage.Raymond Hettinger2004-09-291-0/+16
|
* * Increase test coverage.Raymond Hettinger2004-09-281-0/+29
| | | | * Have groupby() be careful about decreffing structure members.
* Use floor division operator.Raymond Hettinger2004-09-271-1/+1
|
* Improve three recipes in the itertools docs.Raymond Hettinger2004-09-231-3/+9
|
* test_sf_950057's gen1() used an assert statement, which caused the testTim Peters2004-07-181-1/+1
| | | | to fail when running with -O. Changed to raise AssertionError instead.
* SF #950057: itertools.chain doesn't "process" exceptions as they occurRaymond Hettinger2004-05-081-0/+30
| | | | | | | Both cycle() and chain() were handling exceptions only when switching input sources. The patch makes the handle more immediate. Will backport.
* Give itertools.repeat() a length method.Raymond Hettinger2004-02-101-1/+7
|
* Add a Guido inspired example for groupby().Raymond Hettinger2004-01-201-0/+14
|
* Guido grants a Christmas wish:Raymond Hettinger2003-12-171-5/+5
| | | | sorted() becomes a regular function instead of a classmethod.
* Implement itertools.groupby()Raymond Hettinger2003-12-061-1/+107
| | | | | | | 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).
* Improve the implementation of itertools.tee().Raymond Hettinger2003-11-121-24/+31
| | | | | | | | | | | 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.
* Replace the window() example with pairwise() which demonstrates tee().Raymond Hettinger2003-10-261-13/+10
|
* Minor improvements to itertools.tee():Raymond Hettinger2003-10-261-0/+12
| | | | | | * tee object is no longer subclassable * independent iterators renamed to "itertools.tee_iterator" * fixed doc string typo and added entry in the module doc string
* Added itertools.tee()Raymond Hettinger2003-10-241-61/+130
| | | | | | 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.
* Adopt Christian Stork's suggested argument order for the logic quantifiers.Raymond Hettinger2003-10-051-11/+11
| | | | Adopt Jeremy Fincher's suggested function name, "any", instead of "some".
* Simplify doctest of tee().Raymond Hettinger2003-09-131-6/+2
|
* Add an example to address a common question of how to split iterators.Raymond Hettinger2003-09-081-4/+30
|
* SF bug #793826: using itertools.izip to mutate tuplesRaymond Hettinger2003-08-291-1/+32
| | | | Avoid Armin Rigo's dastardly exercise in re-entrancy.
* Modified itertools.izip() to match the behavior of __builtin__.zip()Raymond Hettinger2003-08-081-1/+6
| | | | which can now take zero arguments.
* Re-sync doc tests with the doc updates.Raymond Hettinger2003-08-081-3/+7
|
* More testsRaymond Hettinger2003-06-291-3/+59
| | | | | * Test with infinite inputs (using take() on the output) * Test whether GC can find and eliminate cycles.
* Add take() to examples. Tighten the islice() exampleRaymond Hettinger2003-06-281-1/+7
|
* Minor updates:Raymond Hettinger2003-06-181-5/+14
| | | | | | * Updated comment on design of imap() * Added untraversed object in izip() structure * Replaced the pairwise() example with a more general window() example
* Test ability to handle various type of iterators.Raymond Hettinger2003-05-291-4/+188
|
* Minor cleanups.Raymond Hettinger2003-05-161-5/+1
|
* * Added a substantial number of edge case and argument tests forRaymond Hettinger2003-05-031-15/+76
| | | | | | | the itertoolsmodule. * Taught itertools.repeat(obj, n) to treat negative repeat counts as zero. This behavior matches that for sequences and prevents infinite loops.
* Add StopIteration tests.Raymond Hettinger2003-05-021-7/+27
| | | | Simplify test_main().
* The previous made the stop argument optional.Raymond Hettinger2003-05-021-1/+1
| | | | It is better to be explicit and just allow stop to be None.
* SF bug #730685: itertools.islice stop argument is not optionalRaymond Hettinger2003-05-021-3/+71
| | | | | * itertools.islice() stop argument did not perform as documented. * beefed-up test suite
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-3/+1
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* User requested changes to the itertools module.Raymond Hettinger2003-02-231-11/+12
| | | | | Subsumed times() into repeat(). Added cycle() and chain().
* C Code:Raymond Hettinger2003-02-091-3/+22
| | | | | | | | | | | | | | | * Removed the ifilter flag wart by splitting it into two simpler functions. * Fixed comment tabbing in C code. * Factored module start-up code into a loop. Documentation: * Re-wrote introduction. * Addede examples for quantifiers. * Simplified python equivalent for islice(). * Documented split of ifilter(). Sets.py: * Replace old ifilter() usage with new.
* SF bug #681003: itertools issuesRaymond Hettinger2003-02-071-0/+3
| | | | | | | | | | | * Fixed typo in exception message for times() * Filled in missing times_traverse() * Document reasons that imap() did not adopt a None fill-in feature * Document that count(sys.maxint) will wrap-around on overflow * Add overflow test to islice() * Check that starmap()'s argument returns a tuple * Verify that imap()'s tuple re-use is safe * Make a similar tuple re-use (with safety check) for izip()
* Neaten ref count test.Raymond Hettinger2003-02-011-1/+1
|
* Move itertools module from the sandbox and into production.Raymond Hettinger2003-02-011-0/+158