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
Finite Family: sort dictionary keys in repr #24438
Comments
Commit: |
comment:4
I had meant to respond to this earlier, but it fell off my radar. I think that |
comment:5
I see, that makes sense. |
comment:6
Ah, I knew I already did this, and forgot it still needed work :) |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:9
Hold on, just realized this is actually wrong |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:12
What if the keys are not sortable, say |
comment:13
I think this will fail with your branch:
(I am at the airport waiting for a flight and my laptop only have 8.3.beta0, so I cannot test it right now.) |
comment:14
True--I didn't see any cases in the tests where that was a problem but that could certainly happen I guess. On Python 3 I mentioned in my commit message that we might want to add something like this to Sage--I've definitely been finding other places in Sage where one would like to at least order things as best possible. Maybe I'll go ahead and do that first... |
comment:15
Still planning to work on fixing this up. I'm running into issues with these again :) |
comment:16
I believe this issue can reasonably be addressed for Sage 8.4. |
comment:17
Any progress? |
comment:18
ticket was duplicated in #26225... |
comment:19
let us close this one as duplicate |
comment:20
Ok. |
Although the order of indices is not necessarily meaningful, it often makes for nicer, more human-meaningful output to sort them. For example:
instead of the more seemingly arbitrary
which of course is itself a result that is not in any way guaranteed.
In addition to being more user-friendly, this change will also help a lot with tests that otherwise fail on Python 3 due to arbitrary differences in dict key ordering.
Component: misc
Author: Erik Bray
Branch/Commit: u/embray/sets/sort-finite-family-repr @
4573574
Issue created by migration from https://trac.sagemath.org/ticket/24438
The text was updated successfully, but these errors were encountered: