[Python-ideas] Set starting point for itertools.product()
Steven D'Aprano
steve at pearwood.info
Thu Oct 25 01:49:30 EDT 2018
On Thu, Oct 25, 2018 at 11:47:18AM +0800, Ronie Martinez wrote:
> Hi,
>
> My idea is to set the starting point for itertools.product()
> <https://docs.python.org/3.6/library/itertools.html#itertools.product>
> since it becomes very slow if the point of interest is in the middle. For
> example when working with datetime tuples with seconds resolution (worst
> case, milli/microseconds), you need to skip a lot of items.
I don't understand what you mean by "skip a lot of items" or why this
applies to datetime tuples.
Can you give a SHORT and SIMPLE example, showing both the existing
solution and your proposed solution?
--
Steve
More information about the Python-ideas
mailing list