Changes between Version 30 and Version 31 of Ticket #20767


Ignore:
Timestamp:
08/03/16 14:34:13 (5 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20767 – Description

    v30 v31  
    33The main consequence is that it matters a lot less whether a class inherits from `Element` or from `ModuleElement`/`RingElement`/`FieldElement`...
    44
    5 One difference remains: the more specialized classes have some default implementations for arithmetic. For example, `ModuleElement` implements unary negation as multiplication by -1. The base class `Element` has no default implementations.
     5One difference remains: the more specialized classes have some default implementations for arithmetic. For example, `ModuleElement` implements unary negation as multiplication by -1. The base class `Element` has no such default implementations.
    66
    7 This 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 certain arithmetic operations will override whatever is in the category. For the base class `Element`, this is not an issue since there are no default implementations.
     7This 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.