Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
minor code rewrite (PEP8 etc) in full_group_by
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Apr 16, 2019
1 parent 0f53650 commit 01b5429
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/combinat/finite_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,11 +1010,11 @@ def full_group_by(l, key=lambda x: x):
k = key(item)
s = str(k)
if s in original_keys:
if original_keys[s]!=k:
raise ValueError("Two distinct elements with representation "
"%s " % s)
if original_keys[s] != k:
raise ValueError(
'two distinct elements with representation {}'.format(s))
else:
original_keys[s]=k
original_keys[s] = k
elements[s].append(item)
return [(original_keys[s], elements[s]) for s in sorted(elements)]

Expand Down

0 comments on commit 01b5429

Please sign in to comment.