On Tue, Apr 16, 2019 at 4:43 PM Daniel Krenn <kr...@aon.at> wrote: > > In Python2-SageMath we have > > sage: frozenset([frozenset(['A', 'B']), frozenset(['B', 'C'])]) > frozenset({frozenset({'B', 'C'}), frozenset({'A', 'B'})}) > > in all my trials, whereas in Python3 we get all possible permutations of > the elements at random. > > Even using > > 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? > > Background: This comes from a doctest in > sage.combinat.finite_state_machine, where this is a label of a state > after some minimization etc.
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. One idea Odile and I came up with was to maybe have a custom doctest output parser for sets that is able to compare sets be value without worrying about their display order. This dovetails partially with a different, but related idea, of making it possible to implement (either global, or per-module) custom doctest parsers: https://trac.sagemath.org/ticket/26774 -- 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 sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.