On Mon, 7 Aug 2017, David Roe wrote:
Yet for a user looking at the examples of using such a function, it's nicer to
see
sage: my_func(inputs) # unordered
[A, C, B]
rather than
sage: set([str(c) for c in my_func(inputs)]) == set(["A","B","C"])
True
Maybe just
EXAMPLES::
sage: my_func(inputs) # Not tested, result is unordered
[A, C, B]
TESTS::
sage: set(my_func(inputs)) == set(["A","B","C"])
True
? This has been discussed earlier and I think we have no good solution.
For example a vertex of a graph has set of neighbors and a polynomial has
a set of roots, yet we return a list of neighbors and a list of roots. I
guess that the user can figure out what happened if an example says
sage: my_func(inputs)
[1, 2]
and he/she got
[2, 1]
--
Jori Mäntysalo