-
-
Notifications
You must be signed in to change notification settings - Fork 567
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
AbstractLinearCode
should throw sensible error messages on printing
#20899
Comments
comment:1
Fixed amusing spelling mistake in the title... |
AbstractLinearCode
shouldn't throw sensible error messages on printingAbstractLinearCode
should throw sensible error messages on printing
Commit: |
comment:3
Hello, I pushed a fix for this ticket. Two remarks:
Best, David New commits:
|
Author: David Lucas |
Reviewer: Bruno Grenet |
comment:4
Two changes and a comment/question in
|
comment:6
I fixed what you asked, except for your third comment, as I'm not sure it's possible to do that. |
Changed keywords from linear code, error messages to linear code, error messages, rd3 |
comment:7
Replying to @sagetrac-dlucas:
Nice. One could use the attribute RuntimeError: Please override _repr_ in the implementation of MyCode_with_category I am not sure this is actually better. So I think the current ticket in its current form is already a sufficient improvement over the current state. |
Changed branch from u/dlucas/abstract_lin_code_print_error_messages to |
The doc explicitly says that to create a new class of linear codes, you must override
_repr_
and_latex_
. However, if the user forgets, a bizarre error seems to be thrown when trying to print an instance of the new code class:If
AbstractLinearCode
had a_repr_
and a_latex_
method which both threw sensible error messages, this would be much more helpful to the user.CC: @sagetrac-dlucas
Component: coding theory
Keywords: linear code, error messages, rd3
Author: David Lucas
Branch/Commit:
b0bca6f
Reviewer: Bruno Grenet
Issue created by migration from https://trac.sagemath.org/ticket/20899
The text was updated successfully, but these errors were encountered: