Shashwat Anand <anand.shash...@gmail.com> added the comment:

I do not understand why python2.7 is marked in Version tag ?

I reproduced the error on 3.1 but no isues on 2.7

06:39:30 l0nwlf-MBP:data $ python2.7
Python 2.7a4+ (trunk:78750, Mar  7 2010, 08:09:00) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> d = datetime.timedelta(1)
>>> d / 2
datetime.timedelta(0, 43200)
>>> d // 2
datetime.timedelta(0, 43200)
>>> 

06:41:13 l0nwlf-MBP:data $ python3.1
Python 3.1.1 (r311:74480, Mar 21 2010, 20:21:46) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> d = datetime.timedelta(1)
>>> d / 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'datetime.timedelta' and 'int'
>>> d // 2
datetime.timedelta(0, 43200)
>>>

----------
nosy: +l0nwlf

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1083>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to