On 16.04.19 16:59, E. Madison Bray wrote:
> On Tue, Apr 16, 2019 at 4:43 PM Daniel Krenn <[email protected]> wrote:
>> sage: from IPython.lib.pretty import pretty
>> sage: pretty(frozenset([frozenset(['A', 'B']), frozenset(['B', 'C'])]))
>>
>> displays the set of sets with random order. How to deal with this?
> Yes, for sets of sets it's still an open question how to deal with
> them, since there's obviously no one correct way to order them.

There is some kind of sorting with ``pretty``:
https://github.com/ipython/ipython/blob/master/IPython/lib/pretty.py#L124

However, this does not seem to be used with frozensets (but I did not
study the code very carefully, how pretty printing works). It seems that
they try sorting and if it fails use the string representations as keys.
(which would work fine in this particular situation).

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to