Skip to content

Commit

Permalink
Merge b6220e5 into d722dca
Browse files Browse the repository at this point in the history
  • Loading branch information
jseabold committed Sep 21, 2014
2 parents d722dca + b6220e5 commit 1b9e88b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions statsmodels/compat/python.py
Expand Up @@ -38,7 +38,7 @@
import io
bytes = bytes
str = str
asunicode = str
asunicode = lambda x, _ : str(x)

def asbytes(s):
if isinstance(s, bytes):
Expand Down Expand Up @@ -107,10 +107,10 @@ def lfilter(*args, **kwargs):
def isfileobj(f):
return isinstance(f, file)

def asunicode(s):
if isinstance(s, str):
def asunicode(s, encoding='ascii'):
if isinstance(s, unicode):
return s
return s.decode('ascii')
return s.decode(encoding)

def open_latin1(filename, mode='r'):
return open(filename, mode=mode)
Expand Down

0 comments on commit 1b9e88b

Please sign in to comment.