Message75881
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, belopolsky, jribbens, vstinner, webograph |
| Date |
2008年11月14日.18:28:40 |
| SpamBayes Score |
0.0031130055 |
| 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 |
|