line breaking hints in the ViewString
method for lists
#3440
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Up to now,
ViewObj
andViewString
behaved differently for lists,due to the prescribed line breaking hints
\<
and\>
.This was a reason why new
ViewString
methods for complicated GAP objectswere likely to produce output that looked different from
ViewObj
output.With the proposed change, the line breaking hints in the
ViewObj
andViewString
methodsfor finite lists are made consistent with those that appear in the kernel function
PrintListDefault
.Only a few test examples are affected by this change, they have been adjusted.
(I think that after this change, it will make sense to add more
ViewString
methods.)An open problem is that
ViewString
cannot handle self-referential objects.Note that the GAP kernel does some bookkeeping in the case of
ViewObj
;an analogous mechanism would be possible also for
ViewString
.Text for release notes
Fixed the line breaking hints in the
ViewString
method for finite lists.Checklist for pull request reviewers
If your code contains kernel C code, run
clang-format
on it; thesimplest way is to use
git clang-format
, e.g. like this (don'tforget to commit the resulting changes):
usage of relevant labels
release notes: not needed
orrelease notes: to be added
bug
orenhancement
ornew feature
stable-4.X
add thebackport-to-4.X
labelbuild system
,documentation
,kernel
,library
,tests
runnable tests
adequate pull request title
well formulated text for release notes
relevant documentation updates
sensible comments in the code