summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_itertools.py
Commit message (Collapse)AuthorAgeFilesLines
* Alter recipe to show how to call izip_longest() withRaymond Hettinger2008-07-311-2/+1
| | | | both a keyword argument and star arguments.
* Neaten-up the itertools recipes.Raymond Hettinger2008-07-301-6/+4
|
* Clean-up itertools docs and recipes.Raymond Hettinger2008-07-191-55/+17
|
* Fix compress() recipe in docs to use itertools.Raymond Hettinger2008-07-191-3/+3
|
* Add recipe to the itertools docs.Raymond Hettinger2008-07-191-0/+18
|
* Simplify demo code.Raymond Hettinger2008-03-231-1/+1
|
* Add recipe to docs.Raymond Hettinger2008-03-111-0/+9
|
* Tweak recipes and testsRaymond Hettinger2008-03-071-7/+30
|
* Issue 2246: itertools grouper object did not participate in GC (should be ↵Raymond Hettinger2008-03-061-0/+7
| | | | backported).
* More tests.Raymond Hettinger2008-03-061-6/+144
|
* C implementation of itertools.permutations().Raymond Hettinger2008-03-051-13/+18
|
* Beef-up docs and tests for itertools. Fix-up end-case for product().Raymond Hettinger2008-03-041-6/+112
|
* Handle the repeat keyword argument for itertools.product().Raymond Hettinger2008-02-291-0/+3
|
* Add alternate constructor for itertools.chain().Raymond Hettinger2008-02-281-0/+7
|
* Have itertools.chain() consume its inputs lazily instead of building a tuple ↵Raymond Hettinger2008-02-281-2/+2
| | | | of iterators at the outset.
* Larger test rangeRaymond Hettinger2008-02-271-1/+1
|
* Add itertools.combinations().Raymond Hettinger2008-02-261-0/+24
|
* Make sure the itertools filter functions give the same performance for ↵Raymond Hettinger2008-02-251-0/+2
| | | | func=bool as func=None.
* Improve the implementation of itertools.product()Raymond Hettinger2008-02-231-0/+3
| | | | | | | | * Fix-up issues pointed-out by Neal Norwitz. * Add extensive comments. * The lz->result variable is now a tuple instead of a list. * Use fast macro getitem/setitem calls so most code is in-line. * Re-use the result tuple if available (modify in-place instead of copy).
* First draft for itertools.product(). Docs and other updates forthcoming.Raymond Hettinger2008-02-221-0/+28
|
* Make starmap() match its pure python definition and accept any itertable ↵Raymond Hettinger2008-01-171-1/+2
| | | | input (not just tuples).
* Fix test of count.__repr__() to ignore the 'L' if the count is a longRaymond Hettinger2007-10-121-1/+4
|
* itertools.count() no longer limited to sys.maxint.Raymond Hettinger2007-10-041-1/+6
|
* Fix those parts in the testsuite that assumed that sys.maxint would cause ↵Kristján Valur Jónsson2007-05-031-2/+4
| | | | overflow on x64. Now the testsuite is well behaved on that platform.
* Whitespace normalization.Tim Peters2007-03-121-4/+4
|
* Add itertools.izip_longest().Raymond Hettinger2007-02-211-0/+54
|
* Do not let overflows in enumerate() and count() pass silently.Raymond Hettinger2007-02-081-2/+1
|
* Bug #1486663: don't reject keyword arguments for subclasses of builtinGeorg Brandl2007-01-211-1/+17
| | | | types.
* * regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_tJack Diederich2006-09-211-0/+4
| | | | | | which breaks negative counts * added test for negative numbers will backport to 2.5.1
* Bug #1550714: fix SystemError from itertools.tee on negative value for n.Neal Norwitz2006-09-021-0/+1
| | | | Needs backport to 2.5.1 and earlier.
* ("Forward-port" of r46506)Armin Rigo2006-05-281-1/+1
| | | | | | | | | | | | | | Remove various dependencies on dictionary order in the standard library tests, and one (clearly an oversight, potentially critical) in the standard library itself - base64.py. Remaining open issues: * test_extcall is an output test, messy to make robust * tarfile.py has a potential bug here, but I'm not familiar enough with this code. Filed in as SF bug #1496501. * urllib2.HTTPPasswordMgr() returns a random result if there is more than one matching root path. I'm asking python-dev for clarification...
* 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.