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 | mishok13 |
|---|---|
| Recipients | Frosburn, mishok13 |
| Date | 2008年06月23日.13:36:51 |
| SpamBayes Score | 0.0004181229 |
| Marked as misclassified | No |
| Message-id | <1214228226.28.0.112705870265.issue3178@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
This is covered in section 3.4.7 of Python Reference Manual: __radd__(self, other) [skipped] These methods are called to implement the binary arithmetic operations (+, -, *, /, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands. These functions are only called if the left operand does not support the corresponding operation and the operands are of different types.[3.3] For instance, to evaluate the expression x-y, where y is an instance of a class that has an __rsub__() method, y.__rsub__(x) is called if x.__sub__(y) returns NotImplemented. [3.3] For operands of the same type, it is assumed that if the non-reflected method (such as __add__()) fails the operation is not supported, which is why the reflected method is not called. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年06月23日 13:37:07 | mishok13 | set | spambayes_score: 0.000418123 -> 0.0004181229 recipients: + mishok13, Frosburn |
| 2008年06月23日 13:37:06 | mishok13 | set | spambayes_score: 0.000418123 -> 0.000418123 messageid: <1214228226.28.0.112705870265.issue3178@psf.upfronthosting.co.za> |
| 2008年06月23日 13:37:04 | mishok13 | link | issue3178 messages |
| 2008年06月23日 13:37:03 | mishok13 | create | |