-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Configurable "tall list" output style #14040
Comments
comment:2
I've also folded the
|
This comment has been minimized.
This comment has been minimized.
Author: Volker Braun |
comment:5
Since you're doing some cleanup, please forgive me nitpicking but you missed Best, Travis |
comment:6
How badly is this going to interfere with classes that use string representations for hashing and comparison, both for time and for unexpected results? If a Also, I think there can be quite some exception raising in coercion discovery. Since error messages sometimes include operands, slowing down string conversions can possibly affect performance there too. (That's a bit of a general problem: normally you'd think that by the time you're making string representations, you don't have to worry about basic speed any more. I'm not so sure that holds in Sage) |
comment:7
Nils, there is nothing user-configurable here. Its about metadata, not a configuration system. The only one who should change the For the patchbot who can't get the order right: apply trac_14040_housekeeping.patch trac_14040_repr_option.patch trac_14040_doctest.patch |
comment:8
I've also fixed the docstrings in the first patch. |
This comment has been minimized.
This comment has been minimized.
Attachment: trac_14040_housekeeping.patch.gz Updated patch |
Updated patch |
comment:10
Attachment: trac_14040_doctest.patch.gz I've rebased the patches on top of sage-5.7.beta2. Older version will likely not work fyi. |
comment:11
Rebased to sage-5.7.beta4. Since this patch touches a couple of disparate places I would appreciate if somebody could review it so I don't have to spend my time rebasing it for every new beta. |
comment:12
Hey Volker, I have a few questions/comments:
I've put the pounds
It currently looks good to me otherwise. Thank you, Travis |
comment:13
The The strange formatting for commas is because the displayhook treats ascii art as a square block. In this case, the width is set by "Quadratic form in 4 variables over Rational Field with coefficients:" and the comma is placed at the bottom right corner. It would probably be nicer if the displayhook would place the comma after the last non-whitespace character in the bottom row, but thats not the aim of this ticket. |
comment:14
Okay. One last thing I noticed in the housekeeping on line 273:
I would like to see this as
In particular, this should be indented. Once this is done, then I'll set this to positive review. Thank you, Travis |
Reviewer: Travis Scrimshaw |
comment:15
I'm marking this ticket dependent on the "doctests for rings" patch since the two conflict. |
Dependencies: #13685 |
Rebased patch |
comment:16
Attachment: trac_14040_repr_option.patch.gz The last patch addresses your issues. |
This comment has been minimized.
This comment has been minimized.
comment:17
For the patchbot: apply trac_14040_housekeeping.patch, trac_14040_repr_option.patch, trac_14040_doctest.patch, trac_14040_review.patch |
comment:18
The current patch does not apply for me (as well) on |
comment:19
It applies cleanly on sage-5.8.beta1. I think its pretty hopeless to try to collect all tickets since 5.7.beta3 that this would depend on. |
Updated patch |
comment:20
Attachment: trac_14040_review.patch.gz Got the wrong number for the "doctests for rings" ticket... |
comment:21
Then do you want me to rebase #13685 over this ticket? |
comment:22
Apparently #13685 needs to be rebased anyways, this was the problem in with the patchbot. It would be nice if you can base it on this ticket, otherwise it'll depend on what Jeroen merges first. |
comment:23
I'll be rebasing #13685 on this ticket (once Thank you, Travis |
Merged: sage-5.8.beta2 |
The displayhook pretty-prints lists/tuples of matrices in a readable way:
But this is hardcoded to only apply to matrix types:
This ticket aims to add a
_repr_option(key)
method to parents to be able to return meta-information on the_repr_()
output. In particular,_repr_option('element_ascii_art')
will return a boolean that switches between the list display hooks.I've also change the displayhook to switch to the list pretty printing if any entry is an ascii-art element, not just the first one. This upsets a handful of doctests, but is still quite low impact.
Apply
Depends on #13618
Component: misc
Author: Volker Braun
Reviewer: Travis Scrimshaw
Merged: sage-5.8.beta2
Issue created by migration from https://trac.sagemath.org/ticket/14040
The text was updated successfully, but these errors were encountered: