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 | brett.cannon |
|---|---|
| Recipients | brett.cannon, skip.montanaro |
| Date | 2007年09月14日.00:10:15 |
| SpamBayes Score | 0.020556293 |
| Marked as misclassified | No |
| Message-id | <1189728616.19.0.0424066089391.issue1083@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2007年09月14日 00:10:16 | brett.cannon | set | spambayes_score: 0.0205563 -> 0.020556293 recipients: + brett.cannon, skip.montanaro |
| 2007年09月14日 00:10:16 | brett.cannon | set | spambayes_score: 0.0205563 -> 0.0205563 messageid: <1189728616.19.0.0424066089391.issue1083@psf.upfronthosting.co.za> |
| 2007年09月14日 00:10:16 | brett.cannon | link | issue1083 messages |
| 2007年09月14日 00:10:15 | brett.cannon | create | |