Skip to content

Commit

Permalink
Minor style improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandar Makelov committed Aug 6, 2012
1 parent fabddb8 commit 8820277
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sympy/combinatorics/named_groups.py
Expand Up @@ -70,13 +70,13 @@ def AlternatingGroup(n):
"""
# small cases are special
if n == 1 or n == 2:
if n in (1, 2):
return PermutationGroup([Permutation([0])])

a = range(n)
a[0], a[1], a[2] = a[1], a[2], a[0]
gen1 = _new_from_array_form(a)
if n % 2 == 1:
if n % 2:
a = range(1, n)
a.append(0)
gen2 = _new_from_array_form(a)
Expand Down
6 changes: 3 additions & 3 deletions sympy/combinatorics/perm_groups.py
Expand Up @@ -475,7 +475,7 @@ def _random_pr_init(self, r, n, _random_prec_n=None):
Notes
=====
THIS FUNCTION HAS SIDE EFFECTS: it changes the attribute
XXX THIS FUNCTION HAS SIDE EFFECTS: it changes the attribute
self._random_gens
See Also
Expand Down Expand Up @@ -1732,7 +1732,7 @@ def orbit(self, alpha, action='tuples'):
orb.append(temp)
used[temp] = True
return set(orb)
if action == 'tuples':
elif action == 'tuples':
alpha = tuple(alpha)
orb = [alpha]
used = set([alpha])
Expand All @@ -1744,7 +1744,7 @@ def orbit(self, alpha, action='tuples'):
orb.append(temp)
used.add(temp)
return set(orb)
if action == 'sets':
elif action == 'sets':
alpha = frozenset(alpha)
orb = [alpha]
used = set([alpha])
Expand Down

0 comments on commit 8820277

Please sign in to comment.