STINNER Victor <[EMAIL PROTECTED]> added the comment: The current behaviour is consistent with the integer divison: >>> 21 // 10 2 >>> timedelta(microseconds=20) // 10 datetime.timedelta(0, 0, 2)
Whereas int/int gives float: >>> 21 / 10 2.1000000000000001 >> timedelta(microseconds=20) / 1 ... TypeError: unsupported operand type(s) for /: ... Now in the real world, it's hard to understand that the operator // should be used instead of /. So timedelta()/int might be an alias to timedelta()//int. ---------- nosy: +haypo _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1083> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com