"Mathias Panzenboeck" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I wrote a few functions which IMHO are missing in python(s itertools). > > You can download them here: > http://sourceforge.net/project/showfiles.php?group_id=165721&package_id=212104 > > A short description to all the functions: > Just a couple of questions:
> iproduct(iterable, start=0) -> value > Returns the product of the elements of a iterable > times the value of parameter 'start'. When the > iterable is empty, returns start. > Wouldn't 1 be a better default value for start? > forall(predicate, iterable, default=True) -> bool > Returns True, when for all elements x in iterable > predicate(x) is True. When the iterable is empty, > returns default. > > > forany(predicate, iterable, default=False) -> bool > Returns True, when for any element x in iterable > predicate(x) is True. When the iterable is empty, > returns default. > How are these different from all and any in Python 2.5? -- Paul -- http://mail.python.org/mailman/listinfo/python-list