New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the coercion code (in __mul__) should call __rmul__ when left or right is not coercible to a Sage element #2283
Comments
comment:1
Attachment: coercion-rmul.patch.gz |
comment:2
Currently, (before this patch), if a class did
things would work since the coercion model looks for an _r_action function as a last resort. This patch just makes this line unnecessary by having the coercion system also look for an Apparently this patch is controversial to at least one person, so it probably ought to be discussed. |
comment:3
disclaimer: I don't know much at all about the coercion system; the above statements are from observations made in running examples. |
comment:4
Attachment: coercion-rmul2.patch.gz credit goes to gfurnish for noticing and helping track down the segfault that the original patch introduced! Apply coercion-rmul2.patch instead of coercion-rmul.patch |
comment:5
(and gfurnish also knew how to fix the error causing the segfault!) |
comment:6
The patches above apply to 2.10.2. |
comment:7
Looks good to me. Thanks guys! |
comment:8
Merged coercion-rmul2.patch in Sage 2.10.3.rc0 |
In this example the last print statement goes boom, but should work fine.
Component: coercion
Issue created by migration from https://trac.sagemath.org/ticket/2283
The text was updated successfully, but these errors were encountered: