[Python-ideas] Adding some standalone iterator/sequence functions as methods of the iterator objects

George Sakkis george.sakkis at gmail.com
Thu Aug 13 02:18:27 CEST 2009


2009/8/12 Manuel Alejandro Cerón Estrada <ceronman at gmail.com>:

> Sorry for getting back already discussed ideas. Finding old
> discussions can be very hard since the Python mailing lists have
> thousands of mails and some time you just don't use the correct
> keywords while searching.

Check out the (long) "Builtin iterator type" thread at
http://mail.python.org/pipermail/python-3000/2006-November/; I don't
know if there are more.

> I'm thinking on implementing this as a third party wrapper module for
> itertools and others. An QueryIter wrapper class could help to this
> purpose and It would be very easy to implement. Could be something
> like this:
>
> pairs_tasks = IterQuery(programmers).combinations(2).cycle().izip(tasks)

You can start from the recipe spawned off the 2006 thread:
http://code.activestate.com/recipes/498272/.

George



More information about the Python-ideas mailing list