#x27;,
> 12: 'Z'
> }
>
> where key is a month.
> Now i want to get certain number of months. Say, i need 3 months duration
> starting from any month in dict.
>
> so if i start @ 7th:
> my_choice =7
> for mnth, value in fut_suffi
writes:
> >
> > > Now i want to get certain number of months. Say, i need 3 months
> duration
> > > starting from any month in dict.
> > >
> > > so if i start @ 7th:
> > > my_choice =7
> > > for mnth, value in fut_suffix:
> >
7
> > for mnth, value in fut_suffix:
> > if my_choice >= mnth
> ># life is great
> > but if :
> > my_choice = 12 then my "time travel" becomes pain in the neck..
>
> The ‘itertools’ library in the Python standard library
> https://
Ben Finney writes:
> import itertools
>
> month_values = sorted(list(fut_suffix.keys()))
> month_cycle = itertools.cycle(month_values)
>
> month_choice = 7
> three_months_starting_at_choice = []
> while len(three_months_starting_at_choice) < 3:
> this_month = next(
Andrew Z writes:
> Now i want to get certain number of months. Say, i need 3 months duration
> starting from any month in dict.
>
> so if i start @ 7th:
> my_choice =7
> for mnth, value in fut_suffix:
> if my_choice >= mnth
># life is great
> but if :
ain number of months. Say, i need 3 months duration
starting from any month in dict.
so if i start @ 7th:
my_choice =7
for mnth, value in fut_suffix:
if my_choice >= mnth
# life is great
but if :
my_choice = 12 then my "time travel" becomes pain in the neck..
And as such
;Z'
> }
>
> where key is a month.
> Now i want to get certain number of months. Say, i need 3 months duration
> starting from any month in dict.
>
> so if i start @ 7th:
> my_choice =7
> for mnth, value in fut_suffix:
> if my_choice >= mnth
&
Lee Merrill wrote:
And I can't do arithmetic, it is actually about 3600--never mind!
Don't feel too bad. Obviously Guido nipped back to
March 8 2008 in his time machine and fixed the problem,
making it *look* like you can't do arithmetic. Time
travel often leads to embarrass
And I can't do arithmetic, it is actually about 3600--never mind!
On Nov 17, 10:37 am, Lee Merrill wrote:
> I'm seeing an anomaly in the python time function on March 9, 2008
> (the "spring foward" time):
>
> >>> time.mktime((2008, 3, 9, 2, 59, 59, 0, 0, -1))
> 1205049599.0
> >>> time.mktime((20
I'm seeing an anomaly in the python time function on March 9, 2008
(the "spring foward" time):
>>> time.mktime((2008, 3, 9, 2, 59, 59, 0, 0, -1))
1205049599.0
>>> time.mktime((2008, 3, 9, 3, 0, 0, 0, 0, -1))
1205046000.0
Does anyone have an idea as to what might cause a 4000 seconds
backwards jum
10 matches
Mail list logo