-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #33824: make gens and orbits of PermutationGroup immutable
We don't want the following to happen: {{{ sage: G = PermutationGroup([ [(3,4)], [(1,3)] ]) sage: O = G.orbits(); O [[1, 3, 4], [2]] sage: O[0] = 1 sage: G.orbits() [1, [2]] sage: G = PermutationGroup([[2,1]]); G Permutation Group with generators [(1,2)] sage: g = G.gens() sage: g[0] = 1 sage: G.gens() [1] }}} Therefore, we change the return type of `gens` and `orbits` to be a tuple of tuples. We keep the `_repr_` of `PermutationGroup_generic`, because the output is more compact. Note that `gens` returns a tuple for all other groups I checked. URL: https://trac.sagemath.org/33824 Reported by: mantepse Ticket author(s): Martin Rubey Reviewer(s): Travis Scrimshaw
- Loading branch information
Showing
12 changed files
with
176 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.