-
Notifications
You must be signed in to change notification settings - Fork 161
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
fix indentation when printing double cosets #5841
fix indentation when printing double cosets #5841
Conversation
The distribution of `\<` and `\>` hints was obviously wrong. I still do not understand why the hints were chosen this way. Usually the idea is to mark positions in the string where line breaks are more suitable than in other places, for example at the commas that separate objects; but here it is the other way round?
@@ -536,7 +536,7 @@ function(d) | |||
return(STRINGIFY("DoubleCoset(\<", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed weird. I would expect it to start with \>
not \<
. More like so
return(STRINGIFY("DoubleCoset(\<", | |
return(STRINGIFY("DoubleCoset(\>", | |
ViewString(LeftActingGroup(d)),"\<,\>", | |
ViewString(Representative(d)),"\<,\>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point is that I do not know what the idea behind this code was.
Also the fact that whitespace behind the commas is missing is unusual.
I guess this code was never really used, otherwise the indentation problem would have been noticed earlier.
Shall we just change this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we just change this method?
Fine by me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This obviously is better than what was before, but still looks strange (similar for the ViewString
method for (right) cosets)
Another irritating behaviour:
Calling the |
The kernel operations The printing methods implemented in GAP code call the kernel function That's why the method does not work when called in isolation. |
This fixes an error so I'll merge it. Perhaps the printing can be improved further but that can be done in a follow-up PR |
O.k. I had a look at the (Also, documentation is missing, and comments in the code are talking about "indentation", which I find confusing.) |
The distribution of
\<
and\>
hints was obviously wrong.I still do not understand why the hints were chosen this way. Usually the idea is to mark positions in the string where line breaks are more suitable than in other places, for example at the commas that separate objects; but here it is the other way round?
resolves #5840