Re: [Tutor] seek and slice a range in a list of dates

2008-02-10 Thread Kent Johnson
washakie wrote: > Yes, I'm using 2.4, and will not likely be able to upgrade... so, the final, > as you suggested Kent: > > > dates_dt=([datetime.datetime(int(dates_list[i][0][:4]),int(dates_list[i][0][4:6]), > > int(dates_list[i][0][6:8]),int(dates_list[i][0][8:

Re: [Tutor] seek and slice a range in a list of dates

2008-02-10 Thread washakie
Yes, I'm using 2.4, and will not likely be able to upgrade... so, the final, as you suggested Kent: dates_dt=([datetime.datetime(int(dates_list[i][0][:4]),int(dates_list[i][0][4:6]), int(dates_list[i][0][6:8]),int(dates_list[i][0][8:10]),

Re: [Tutor] seek and slice a range in a list of dates

2008-02-09 Thread Kent Johnson
washakie wrote: > It's not pretty, but this is what seems to work... I'd be happy hear more > about a better approach... I like the idea of using a list, but ran into > troubles with min and max, maybe I don't entirely understand the lambda > function, but when I tried a list, I got an error that m

Re: [Tutor] seek and slice a range in a list of dates

2008-02-09 Thread washakie
It's not pretty, but this is what seems to work... I'd be happy hear more about a better approach... I like the idea of using a list, but ran into troubles with min and max, maybe I don't entirely understand the lambda function, but when I tried a list, I got an error that min() has no optional va

Re: [Tutor] seek and slice a range in a list of dates

2008-02-09 Thread Alan Gauld
"washakie" <[EMAIL PROTECTED]> wrote > dates, to selected dates (Tstart, Tend)... Now, I need to get all > the dates > (slice) from the dictionary in between the two dates TstartNew and > TendNew. > Basically, I need to know what the 'index' is for them in the in the > dictionay dates_dt. How c

Re: [Tutor] seek and slice a range in a list of dates

2008-02-09 Thread Kent Johnson
washakie wrote: > Hello, > > I'm using the code below to select the closest dates in a dictionary of > dates, to selected dates (Tstart, Tend)... Now, I need to get all the dates > (slice) from the dictionary in between the two dates TstartNew and TendNew. > Basically, I need to know what the 'ind

[Tutor] seek and slice a range in a list of dates

2008-02-09 Thread washakie
Hello, I'm using the code below to select the closest dates in a dictionary of dates, to selected dates (Tstart, Tend)... Now, I need to get all the dates (slice) from the dictionary in between the two dates TstartNew and TendNew. Basically, I need to know what the 'index' is for them in the in t