Skip to content

Commit

Permalink
Trac #28079: Py3: Fix doctest in multiset_partition_into_sets_ordered
Browse files Browse the repository at this point in the history
Add {{{key=str}}} in order to have an effective sort both in py2 and
py3.

URL: https://trac.sagemath.org/28079
Reported by: vklein
Ticket author(s): Vincent Klein
Reviewer(s): Frédéric Chapoton
  • Loading branch information
Release Manager authored and vbraun committed Jul 10, 2019
2 parents 11cacd9 + 1f60fb3 commit 6b42a45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/combinat/multiset_partition_into_sets_ordered.py
Expand Up @@ -2790,9 +2790,9 @@ def _iterator_weight(weight):
sage: OMP = OrderedMultisetPartitionsIntoSets(weight)
sage: l = list(_iterator_weight(weight))
sage: sorted(map(OMP, l)) == sorted(map(OMP, \
sage: sorted(map(OMP, l), key=str) == sorted(map(OMP, \
[[{1}, {1}, {'b'}], [{1}, {1,'b'}], [{1}, {'b'}, {1}], \
[{1,'b'}, {1}], [{'b'}, {1}, {1}]]))
[{1,'b'}, {1}], [{'b'}, {1}, {1}]]), key=str)
True
sage: OMP = OrderedMultisetPartitionsIntoSets({1:3, 3:1})
sage: list(map(OMP, _iterator_weight([3,0,1])))
Expand Down

0 comments on commit 6b42a45

Please sign in to comment.