> > > In particular, Jeroen, concerning the strange rule that _lmul_ not being > implemented means that it returns None: I seem to recall (but I am not > 100% sure) that P._get_action_(Q) (or some other method name, I don't > recall) could test what happens if P.zero()._lmul_(Q.zero()) or similar > things are doing, and depending on the result would conclude that an > action does not exist or does exist, for general elements of P and Q. >
You seem to refer to this part of the code of `detect_element_action(...)`: cdef Element x if X_el is None or (parent(X_el) is not X): x = an_element(X) else: x = X_el if x is None: raise RuntimeError("an_element() for %s returned None" % X) if Y_el is None or (parent(Y_el) is not Y): y = an_element(Y) else: y = Y_el if y is None: if isinstance(Y, Parent): raise RuntimeError("an_element() for %s returned None" % Y) else: return # don't know how to make elements of this type... if isinstance(x, ModuleElement) and isinstance(y, Element): # Elements defining _lmul_ and _rmul_ try: return (RightModuleAction if X_on_left else LeftModuleAction)(Y, X, y, x) except CoercionException as msg: _record_exception() > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.