This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients amaury.forgeotdarc, belopolsky, jribbens, vstinner, webograph
Date 2008-11-14.18:59:45
SpamBayes Score 0.010090841
Marked as misclassified No
Message-id <1226689186.95.0.209737649887.issue2706@psf.upfronthosting.co.za>
In-reply-to
Content
Oops, the tracker ate some lines from e-mail.  Reposting through the 
web:

On Fri, Nov 14, 2008 at 1:28 PM, STINNER Victor <report@bugs.python.org> 
wrote:
..
> 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
already there

>  timedelta // timedelta -> int
+1

>  timedelta % int -> timedelta
+1

>  timedelta % timedelta -> int
+1

timedelta % float -> timedelta (because int % float -> int works) ?

>  divmod(timedelta, int) -> (timedelta, timedelta)
+1

>  divmod(timedelta, timedelta) -> (int, timedelta)
+1

divmod(timedelta, float) -> (timedelta, timedelta) ?

>  timedelta / <anything> -> float # __future__.divison
-1

Only timedelta / timedelta should produce dimensionless numbers.
timedelta / <float or int> should be disallowed in true division mode.
 I am +0 on timedelta / timedelta -> float in true division mode.
Reply
		
Forward
History
Date User Action Args
2008-11-14 18:59:47belopolskysetrecipients: + belopolsky, jribbens, amaury.forgeotdarc, vstinner, webograph
2008-11-14 18:59:46belopolskysetmessageid: <1226689186.95.0.209737649887.issue2706@psf.upfronthosting.co.za>
2008-11-14 18:59:46belopolskylinkissue2706 messages
2008-11-14 18:59:46belopolskycreate