STINNER Victor <[EMAIL PROTECTED]> added the comment: Since timedelta(3) // 2 is already accepted, divmod should also accept integers (but not float).
With the last patch and "from __future__ import division", we support: timedelta // <timedelta or int> timedelta / timedelta divmod(timedelta, timedelta) What do you think about: timedelta / <timedelta or int or float> # only with __future__.divison timedelta // <timedelta or int> timedelta % <timedelta or int> divmod(timedelta, <timedelta or int>) with: timedelta // int -> timedelta timedelta // timedelta -> int timedelta % int -> timedelta timedelta % timedelta -> int divmod(timedelta, int) -> (timedelta, timedelta) divmod(timedelta, timedelta) -> (int, timedelta) timedelta / <anything> -> float # __future__.divison _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2706> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com