Re: timedelta and float multiplication in python 2

2016-02-11 Thread Peter Otten
Nagy László Zsolt wrote: > I ran into a problem today where I had to determine the mean point > between two datetimes. Here is an example: > start = datetime.datetime(2016,2,11) stop = datetime.datetime.now() mean = start + (stop-start)*0.5 > Traceback (most recent call last): >

Re: timedelta and float multiplication in python 2

2016-02-11 Thread Chris Angelico
On Thu, Feb 11, 2016 at 9:39 PM, Nagy László Zsolt wrote: > I have checked and it does work with Python 3. But it does not work with > Python 2 - is there a good reason for this? Mainly that Python 3 has had six years of development since Python 2.7, and Python 2 has been getting only bugfixes an

timedelta and float multiplication in python 2

2016-02-11 Thread Nagy László Zsolt
I ran into a problem today where I had to determine the mean point between two datetimes. Here is an example: >>> start = datetime.datetime(2016,2,11) >>> stop = datetime.datetime.now() >>> mean = start + (stop-start)*0.5 Traceback (most recent call last): File "", line 1, in TypeError: unsuppo