Author vstinner
Recipients amaury.forgeotdarc, belopolsky, jribbens, vstinner, webograph
Date 2008-11-14.18:28:40
SpamBayes Score 0.00311301
Marked as misclassified No
Message-id <200811141927.06978.victor.stinner@haypocalc.com>
In-reply-to <1226686502.12.0.116749756505.issue2706@psf.upfronthosting.co.za>
Content
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
History
Date User Action Args
2008-11-14 18:28:41vstinnersetrecipients: + vstinner, jribbens, amaury.forgeotdarc, belopolsky, webograph
2008-11-14 18:28:40vstinnerlinkissue2706 messages
2008-11-14 18:28:40vstinnercreate