Brett Cannon added the comment:

If you set nb_true_div on timedelta objects to delta_divide (just like
nb_floor_div) you won't have this problem as the division will just
work.  Otherwise there is no other good way as if the divisor doesn't
work you need to return NotImplemented, which then tries the right-hand
object which fails, and 'object' returns the TypeError.  Best you could
do is a warning or something.  

But it might make sense to only set it on nb_true_div as the division
does not round anything.

----------
nosy: +brett.cannon

__________________________________
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

Reply via email to