[Python-ideas] Re: Datetime operation in itertools count

2022-02-10 Thread Aman Pandey
Hello Stephen, I think you misunderstood it. we are not talking about modifying the existing built-in function range rather adding a new function in datetime module that will generate the date and time between two periods. if we add a function like that in the datetime module the code will be exact

[Python-ideas] Re: Datetime operation in itertools count

2022-02-09 Thread Aman Pandey
k a datetime.range object could be useful. > > Perhaps someone can write one and then see if the core devs would accept > it in the stdlib. > > It would be na interesting exercise in any case :-) > > -CHB > > On Tue, Feb 8, 2022 at 10:38 PM Aman Pandey > wrote: > >>

[Python-ideas] Re: Datetime operation in itertools count

2022-02-08 Thread Aman Pandey
. Yesterday I found Pandas Library has this feature <https://pandas.pydata.org/docs/reference/api/pandas.date_range.html>. What do you think? On Tue, Feb 8, 2022 at 9:23 PM Paul Moore wrote: > On Tue, 8 Feb 2022 at 14:00, Aman Pandey wrote: > > > > I wanted to generate all the d

[Python-ideas] Datetime operation in itertools count

2022-02-08 Thread Aman Pandey
I wanted to generate all the dates between two date ranges for which I was using count function in the itertools and to my surprise count function doesn't support datetime operation. For example >import datetime >from itertools import count >count(datetime.date.today(), datetime.timedelta(1)) Wh