summaryrefslogtreecommitdiffstats
path: root/Modules/itertoolsmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove itertools warnings I had added before the 2-to-3 handled the migration.Raymond Hettinger2008-03-191-25/+0
|
* The filter() function does support a None argument in Py3.0.Raymond Hettinger2008-03-191-9/+0
|
* Added zip, map, filter to future_bultins (#2171)David Wolever2008-03-191-2/+11
|
* Consistent tense.Raymond Hettinger2008-03-131-1/+1
|
* Add 2-to-3 support for the itertools moved to builtins or renamed.Raymond Hettinger2008-03-131-0/+25
|
* Issue 2246: itertools grouper object did not participate in GC (should be ↵Raymond Hettinger2008-03-061-5/+15
| | | | backported).
* Small code cleanup.Raymond Hettinger2008-03-051-4/+2
|
* C implementation of itertools.permutations().Raymond Hettinger2008-03-051-0/+274
|
* Fix refleak in chain().Raymond Hettinger2008-03-041-1/+1
|
* Beef-up docs and tests for itertools. Fix-up end-case for product().Raymond Hettinger2008-03-041-4/+1
|
* Handle 0-tuples which can be singletons.Raymond Hettinger2008-03-021-1/+1
|
* Simplify code for itertools.product().Raymond Hettinger2008-03-021-13/+2
|
* Handle the repeat keyword argument for itertools.product().Raymond Hettinger2008-02-291-5/+27
|
* Add alternate constructor for itertools.chain().Raymond Hettinger2008-02-281-1/+25
|
* Have itertools.chain() consume its inputs lazily instead of building a tuple ↵Raymond Hettinger2008-02-281-51/+51
| | | | of iterators at the outset.
* The empty tuple is usually a singleton with a much higher refcnt than 1Christian Heimes2008-02-281-2/+5
|
* One too many decrefs.Raymond Hettinger2008-02-271-3/+1
|
* Add itertools.combinations().Raymond Hettinger2008-02-261-1/+225
|
* Coerced PyBool_Type to be able to compare it.Facundo Batista2008-02-251-2/+2
|
* Make sure the itertools filter functions give the same performance for ↵Raymond Hettinger2008-02-251-2/+2
| | | | func=bool as func=None.
* Add more commentsRaymond Hettinger2008-02-231-4/+4
|
* Improve the implementation of itertools.product()Raymond Hettinger2008-02-231-12/+43
| | | | | | | | * 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-1/+212
|
* Make starmap() match its pure python definition and accept any itertable ↵Raymond Hettinger2008-01-171-3/+4
| | | | input (not just tuples).
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-26/+26
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* itertools.count() no longer limited to sys.maxint.Raymond Hettinger2007-10-041-9/+70
|
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-60/+43
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Fix problems in x64 build that were discovered by the testsuite:Kristján Valur Jónsson2007-05-031-2/+2
| | | | | | | | | | | | - Reenable modules on x64 that had been disabled aeons ago for Itanium. - Cleared up confusion about compilers for 64 bit windows. There is only Itanium and x64. Added macros MS_WINI64 and MS_WINX64 for those rare cases where it matters, such as the disabling of modules above. - Set target platform (_WIN32_WINNT and WINVER) to 0x0501 (XP) for x64, and 0x0400 (NT 4.0) otherwise, which are the targeted minimum platforms. - Fixed thread_nt.h. The emulated InterlockedCompareExchange function didn´t work on x64, probaby due to the lack of a "volatile" specifier. Anyway, win95 is no longer a target platform. - Itertools module used wrong constant to check for overflow in count() - PyInt_AsSsize_t couldn't deal with attribute error when accessing the __long__ member. - PyLong_FromSsize_t() incorrectly specified that the operand were unsigned. With these changes, the x64 passes the testsuite, for those modules present.
* Remove filler struct item and fix leak.Raymond Hettinger2007-02-211-44/+40
|
* Add itertools.izip_longest().Raymond Hettinger2007-02-211-0/+234
|
* Do not let overflows in enumerate() and count() pass silently.Raymond Hettinger2007-02-081-0/+5
|
* Bug #1486663: don't reject keyword arguments for subclasses of builtinGeorg Brandl2007-01-211-12/+13
| | | | types.
* * regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_tJack Diederich2006-09-211-1/+1
| | | | | | 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-2/+6
| | | | Needs backport to 2.5.1 and earlier.
* nextlink can be NULL if teedataobject_new fails, so use XINCREF.Neal Norwitz2006-07-231-2/+8
| | | | | | Ensure that dataobj is never NULL. Reported by Klocwork #102
* Fix compiler warning (and whitespace) on Mac OS 10.4. (A lot of this code ↵Neal Norwitz2006-05-271-4/+4
| | | | looked duplicated, I wonder if a utility function could help reduce the duplication here.)
* use Py_ssize_t in places that may need itJack Diederich2006-05-261-25/+25
|
* Add missing PyObject_GC_Track call, causing *some* itertools.tee objects toThomas Wouters2006-04-151-0/+1
| | | | | | | | | not be tracked by GC. This fixes 254 of test_generators' refleaks on my machine, but I'm sure something else will make them come back :> Not adding a separate test for this kind of cycle, since the existing fib/m235 already test them in more extensive ways than any 'minimal' test has been able to manage.
* Make itertools.tee and its internal teedataobject participate in GC. ThisThomas Wouters2006-03-271-19/+71
| | | | | alone does not solve the leak in test_generators, unfortunately, but it is part of test_generators' problem and it does solve other cycles.
* More unconsting.Martin v. Löwis2006-02-271-1/+1
|
* Use Py_ssize_t for counts and sizes.Martin v. Löwis2006-02-161-8/+8
|
* Renamed _length_cue() to __length_hint__(). See:Armin Rigo2006-02-111-2/+2
| | | | http://mail.python.org/pipermail/python-dev/2006-February/060524.html
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Add const to several API functions that take char *.Jeremy Hylton2005-12-101-1/+1
| | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *.
* Convert iterator __len__() methods to a private API.Raymond Hettinger2005-09-241-8/+12
|
* Disallow keyword arguments for type constructors that don't use them.Georg Brandl2005-08-261-0/+36
| | | | (fixes bug #1119418)
* Added optional None arguments to itertools.islice().Raymond Hettinger2004-12-051-14/+16
|
* some platforms still need offsetof() from structmember.hFred Drake2004-10-171-0/+1
|
* Fix and test weak referencing of itertools.tee objects.Raymond Hettinger2004-10-171-1/+6
|
* Replace structure member before decreffing.Raymond Hettinger2004-10-021-1/+3
|