Skip to content

Commit

Permalink
Merge pull request #23 from danielballan/optional-sort
Browse files Browse the repository at this point in the history
FIX: Do not fail _repr_html_ if keys are unorderable.
  • Loading branch information
tacaswell committed Feb 14, 2016
2 parents 233c66d + dce1784 commit 25e3ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cycler.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def __repr__(self):
def _repr_html_(self):
# an table showing the value of each key through a full cycle
output = "<table>"
sorted_keys = sorted(self.keys)
sorted_keys = sorted(self.keys, key=repr)
for key in sorted_keys:
output += "<th>{key!r}</th>".format(key=key)
for d in iter(self):
Expand Down

0 comments on commit 25e3ceb

Please sign in to comment.