Skip to content

Commit

Permalink
Fixed pretty printed repr output on Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed May 16, 2017
1 parent 8b68e26 commit 8e4c031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions holoviews/core/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
baseclass for classes that accept Dimension values.
"""
from __future__ import unicode_literals
import re
import sys, re
import datetime as dt
from operator import itemgetter

Expand Down Expand Up @@ -1066,7 +1066,7 @@ def range(self, dimension, data_range=True):

def __repr__(self):
reprval = PrettyPrinter.pprint(self)
if isinstance(reprval, unicode):
if sys.version_info.major == 2:
return str(reprval.encode("utf8"))
else:
return str(reprval)
Expand Down

0 comments on commit 8e4c031

Please sign in to comment.