Changes between Version 33 and Version 43 of Ticket #20767


Ignore:
Timestamp:
09/06/16 07:51:39 (5 years ago)
Author:
nthiery
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20767

    • Property Cc SimonKing added
    • Property Commit changed from e1d2ba46574273ec4d358e654ed195a82b81a654 to 343131a9951dc842c462809b9366b13416382dfc
    • Property Milestone changed from sage-7.3 to sage-7.4
  • Ticket #20767 – Description

    v33 v43  
    99This patch also affects lookup in categories: with this patch, double-underscore methods like `__add__` are never taken from the category. The `Element` classes take precedence over the category, so the default implementations of arithmetic operations will override whatever is in the category (this is existing behaviour, not affected by this patch). For the base class `Element`, this is not an issue since there are no default implementations.
    1010
    11 2. Change the implementation of double-underscore methods like `__add__` to return `NotImplemented` if one argument is not a Sage `Element` and coercion fails.
     112. Change the implementation of double-underscore methods like `__add__` to return `NotImplemented` (rather than raise an error) if one argument is not a Sage `Element` and coercion fails.
    1212
    1313This will cause Python to try the reversed operation (`__radd__` or `__add__` in Cython). This way, Sage has improved support for operations with non-Sage types.