Skip to content

Commit 25e3ceb

Browse files
committed
Merge pull request #23 from danielballan/optional-sort
FIX: Do not fail _repr_html_ if keys are unorderable.
2 parents 233c66d + dce1784 commit 25e3ceb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cycler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def __repr__(self):
335335
def _repr_html_(self):
336336
# an table showing the value of each key through a full cycle
337337
output = "<table>"
338-
sorted_keys = sorted(self.keys)
338+
sorted_keys = sorted(self.keys, key=repr)
339339
for key in sorted_keys:
340340
output += "<th>{key!r}</th>".format(key=key)
341341
for d in iter(self):

0 commit comments

Comments
 (0)